/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JInternalFrameManageOrder.java
 *
 * Created on Dec 16, 2011, 7:57:45 PM
 */
package bugreportingsystem;

import Util.*;
import java.awt.Color;
import java.awt.Font;
import java.util.Date;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.Vector;
import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author PhucTakua
 */
public class JInternalFrameManageOrder extends javax.swing.JInternalFrame {

    int row;
    int idpr = -1;
    int idorder = -1;
    int iddispatch = -1;
    int idproduce = -1;
    public int idemployee = JFrameLogin.idemployee;
    Order or = new Order();
    private Vector<String> displaycus = new Vector<String>();
    private Vector<Integer> valuecus = new Vector<Integer>();
    private Vector<DispatchNo> ep1 = DispatchNo.ListIDD();
    private String language = JFrameLogin.language;
    private String country = JFrameLogin.country;
    private Locale lc = new Locale(language, country);
    private ResourceBundle rb = ResourceBundle.getBundle("bugreportingsystem/resources/JInternalFrameManageOrder", lc);
    Customer ct = new Customer();
    int r = -1;
    int idct;

    /** Creates new form JInternalFrameManageOrder */
    public JInternalFrameManageOrder() {
        initComponents();
        DisplayTableProduce(Produce.ListIDProducec());
        DisplayDispatch(ep1);
        DisplayTableOrder(Order.ListOrder());
        MyTranslate();
        DisplayTableCustomer(Customer.ListIDE());
    }

    private TitledBorder SetTitleBorder(String a) {
        Border etched = BorderFactory.createEtchedBorder();
        Font font = new Font("Tahoma", Font.BOLD, 14);
        TitledBorder Title = BorderFactory.createTitledBorder(etched, rb.getString(a));
        Title.setTitleJustification(TitledBorder.LEFT);
        Title.setTitleFont(font);
        Title.setTitleColor(Color.getColor("BLUE", 204));
        return Title;
    }

    private void MyTranslate() {
        jTabbedPane1.setTitleAt(0, rb.getString("jPanelCustomer.TabConstraints.tabTitle"));
        jTabbedPane1.setTitleAt(1, rb.getString("jPanelOrder.TabConstraints.tabTitle"));
        jPanel4.setBorder(SetTitleBorder("jPanel4.border.title"));
        jPanel8.setBorder(SetTitleBorder("jPanel8.border.title"));
        jPanel22.setBorder(SetTitleBorder("jPanel22.border.title"));
        jPanel32.setBorder(SetTitleBorder("jPanel32.border.title"));
        jPanel40.setBorder(SetTitleBorder("jPanel40.border.title"));
        jPanel47.setBorder(SetTitleBorder("jPanel47.border.title"));
        jPanel60.setBorder(SetTitleBorder("jPanel60.border.title"));
        jPanel61.setBorder(SetTitleBorder("jPanel61.border.title"));
        jPanel2.setBorder(SetTitleBorder("jPanel2.border.title"));
        jPanel94.setBorder(SetTitleBorder("jPanel94.border.title"));
        lblName.setText(rb.getString("lblName.text"));
        lblAddress.setText(rb.getString("lblAddress.text"));
        lblPhone.setText(rb.getString("lblPhone.text"));
        lblEmail.setText(rb.getString("lblEmail.text"));
        jLabel2.setText(rb.getString("jLabel2.text"));
        btnAdd.setText(rb.getString("btnAdd.text"));
        btnEdit.setText(rb.getString("btnEdit.text"));
        Clean.setText(rb.getString("Clean.text"));
        btnDelete.setText(rb.getString("btnDelete.text"));
        jButton1.setText(rb.getString("jButton1.text"));
        jButton11.setText(rb.getString("jButton11.text"));
        jButtonSelectCustomer.setText(rb.getString("jButtonSelectCustomer.text"));
        jRadioButtonID.setText(rb.getString("JRadioButtonID.text"));
        jRadioButtonName.setText(rb.getString("JRadioButtonName.text"));
        jRadioButtonOrder.setText(rb.getString("jRadioButtonOrder.text"));
        jRadioButtonDispatch.setText(rb.getString("jRadioButtonDispatch.text"));
        jRadioButtonCustomer.setText(rb.getString("jRadioButtonCustomer.text"));
        jButton2.setText(rb.getString("jButton2.text"));
        jButtonSearchProduct.setText(rb.getString("jButton2.text"));
        jButton3.setText(rb.getString("jButton12.text"));
        jButton4.setText(rb.getString("jButton4.text"));
        jLabel9.setText(rb.getString("jLabel9.text"));
        jButton8.setText(rb.getString("jButton8.text"));
        jButtonAddOrder.setText(rb.getString("jButtonAddOrder.text"));
        jButton5.setText(rb.getString("jButton5.text"));
        jButton10.setText(rb.getString("jButton10.text"));
        jLabel10.setText(rb.getString("jLabel10.text"));
        jLabel11.setText(rb.getString("jLabel11.text"));
        jButton6.setText(rb.getString("jButton6.text"));
        jButton7.setText(rb.getString("jButton7.text"));
        jButton9.setText(rb.getString("jButton9.text"));
        jRadioButtonIdProduce.setText(rb.getString("JRadioButtonID.text"));
        jRadioButtonNameProduce.setText(rb.getString("JRadioButtonName.text"));
        jRadioButtonProduce.setText(rb.getString("jRadioButtonProduce.text"));
        jRadioButtonProducer.setText(rb.getString("jRadioButtonProducer.text"));
        jButton12.setText(rb.getString("jButton12.text"));
        jLabel3.setText(rb.getString("jLabel3.text"));
        jLabel5.setText(rb.getString("jLabel5.text"));
        jLabel6.setText(rb.getString("jLabel6.text"));
        jLabel12.setText(rb.getString("jLabel12.text"));
        jLabel7.setText(rb.getString("jLabel7.text"));
        this.setTitle(rb.getString("Form.title"));

    }
     private void Display() {
        row = this.jTableProduce.getSelectedRow();
        idpr = Integer.parseInt(this.jTableProduce.getValueAt(row, 0).toString());
        this.jTextFieldNameProduce.setText(this.jTableProduce.getValueAt(row, 1).toString());
        this.jTextFieldPrice.setText(this.jTableProduce.getValueAt(row, 2).toString());
        this.jTextFieldWarranty.setText(this.jTableProduce.getValueAt(row, 3).toString());
        this.jTextAreaInformation.setText(this.jTableProduce.getValueAt(row, 4).toString());
    }
    private void DisplayTableProduce(Vector<Produce> listidpd) {
        Vector<String> cols = new Vector<String>();
        cols.add("ID Produce");
        cols.add("Name Produce");
        cols.add("Price");
        cols.add("Warranty");
        cols.add("Information");
        cols.add("Name Producer");

        Vector<Vector> rows = new Vector<Vector>();
        Produce pd = new Produce();
        for (Produce i : listidpd) {
            Vector<Object> idpd = new Vector<Object>();
            idpd.add(i.getIdproduce());
            idpd.add(i.getNameproduce());
            idpd.add(i.getPrice());
            idpd.add(i.getWarranty());
            idpd.add(i.getInfor());
            idpd.add(Producer.ListNameProducer(i.getIdproduce()));
            rows.add(idpd);
        }
        DefaultTableModel dtc = new DefaultTableModel(rows, cols) {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableProduce.setModel(dtc);
        this.jTableProduce.getTableHeader().setReorderingAllowed(false);
    }
    private void DisplayTableProduceNull() {
        Vector<String> cols = new Vector<String>();
        cols.add("ID Produce");
        cols.add("Name Produce");
        cols.add("Price");
        cols.add("Warranty");
        cols.add("Information");
        cols.add("Name Producer");

        Vector<Vector> rows = new Vector<Vector>();
        Produce pd = new Produce();
        DefaultTableModel dtc = new DefaultTableModel(rows, cols) {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableProduce.setModel(dtc);
        this.jTableProduce.getTableHeader().setReorderingAllowed(false);
    }

    private void DisplayDispatch(Vector<DispatchNo> a) {
        Vector<String> cols = new Vector<String>();
        cols.add("iddispatch");
        cols.add("idorder");
        cols.add("Name Produce");
        cols.add("Name Customer");
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>();
        for (int i = 0; i < a.size(); i++) {
            Vector<Object> i1 = new Vector<Object>();

            String nameproduce = Produce.ListTName(a.get(i).getIddispatch());


            i1.add(a.get(i).getIddispatch());
            i1.add(a.get(i).getIdorder());

            i1.add(nameproduce);
            i1.add(a.get(i).getNamecustomer());

            rows.add(i1);
        }
        DefaultTableModel dtm = new DefaultTableModel(rows, cols) {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };

        this.jTableDispatch.setModel(dtm);
        this.jTableDispatch.getTableHeader().setReorderingAllowed(false);
    }

    private void DisplayDispatchNull() {
        Vector<String> cols = new Vector<String>();
        cols.add("iddispatch");
        cols.add("idorder");
        cols.add("Name Produce");
        cols.add("Name Customer");
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>();
        DefaultTableModel dtm = new DefaultTableModel(rows, cols) {
            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableDispatch.setModel(dtm);
        this.jTableDispatch.getTableHeader().setReorderingAllowed(false);
    }

    private void DisplayTableOrder(Vector<Order> a) {
        Vector<String> cols = new Vector<String>();
        cols.add("idorder");
        cols.add("NameCustomer");
        cols.add("DateOrder");
        cols.add("Total");
        cols.add("quantity");
        cols.add("NameEmployee");
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>();
        for (int i = 0; i < a.size(); i++) {
            Vector<Object> i1 = new Vector<Object>();
            int idorders = a.get(i).getIdorder();
            java.sql.Date dateorder = a.get(i).getDateorder();
            int quantity = a.get(i).getQuantity();
            float total = a.get(i).getTotal();
            String nameemloyee = Order.NameEmployee(a.get(i).getIdorder());
            String namecustomer = Order.NameCustomer(a.get(i).getIdorder());
            i1.add(idorders);
            i1.add(namecustomer);
            i1.add(dateorder);
            i1.add(total);
            i1.add(quantity);
            i1.add(nameemloyee);
            rows.add(i1);
        }
        DefaultTableModel dtm = new DefaultTableModel(rows, cols) {
            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableOrder.setModel(dtm);
        this.jTableOrder.getTableHeader().setReorderingAllowed(false);
    }

    private void DisplayTableOrderNull() {
        Vector<String> cols = new Vector<String>();
        cols.add("idorder");
        cols.add("NameCustomer");
        cols.add("DateOrder");
        cols.add("Total");
        cols.add("quantity");
        cols.add("NameEmployee");
       
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>();

        DefaultTableModel dtm = new DefaultTableModel(rows, cols) {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableOrder.setModel(dtm);
        this.jTableOrder.getTableHeader().setReorderingAllowed(false);
    }

    private void DisplayTableCustomer(Vector<Customer> ep1) {
        Vector<String> cols = new Vector<String>();
        cols.add("idcustomer");
        cols.add("Name");
        cols.add("Sex");
        cols.add("Address");
        cols.add("email");
        cols.add("Phone");
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>();
        for (Customer i : ep1) {
            Vector<Object> i1 = new Vector<Object>();
            i1.add(i.getIdcustomer());
            i1.add(i.getNamecustomer());
            i1.add(i.getSex());
            i1.add(i.getHomeaddress());
            i1.add(i.getEmail());
            i1.add(i.getPhone());
            rows.add(i1);
       }
        DefaultTableModel dtm = new DefaultTableModel(rows, cols) {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableCustomer.setModel(dtm);
        this.jTableCustomer.getTableHeader().setReorderingAllowed(false);
    }

    private void DisplayTableCustomerNull() {
        Vector<String> cols = new Vector<String>();
        cols.add("idcustomer");
        cols.add("Name");
        cols.add("Sex");
        cols.add("Address");
        cols.add("email");
        cols.add("Phone");
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>();
        DefaultTableModel dtm = new DefaultTableModel(rows, cols) {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableCustomer.setModel(dtm);
        this.jTableCustomer.getTableHeader().setReorderingAllowed(false);
    }

    private boolean GetSource() {
        if (jTextFieldName.getText().toString().length() == 0) {
            this.jLabelPhone.setText("");
            this.jLabelAddress.setText("");
            this.jLabelEmail.setText("");
            this.jLabelName.setText(rb.getString("InputName"));
            return false;
        } else if (jTextFieldAddress.getText().toString().length() == 0) {
            this.jLabelName.setText("");
            this.jLabelPhone.setText("");
            this.jLabelEmail.setText("");
            this.jLabelAddress.setText(rb.getString("InputAddress"));
            return false;
        } else if (jTextFieldPhone.getText().toString().length() == 0) {
            this.jLabelAddress.setText("");
            this.jLabelName.setText("");
            this.jLabelEmail.setText("");
            this.jLabelPhone.setText(rb.getString("InputPhone"));
            return false;
        } else if (!CommonQuery.CheckPhone(jTextFieldPhone.getText())) {
            this.jLabelName.setText("");
            this.jLabelEmail.setText("");
            this.jLabelAddress.setText("");
            this.jLabelPhone.setText(rb.getString("PhoneWrong"));
            return false;
        } else if (jTextFieldEmail.getText().toString().length() == 0) {
            this.jLabelPhone.setText("");
            this.jLabelName.setText("");
            this.jLabelAddress.setText("");
            this.jLabelEmail.setText("");
            this.jLabelEmail.setText(rb.getString("InputEmail"));
            return false;
        } else if (CommonQuery.CheckEmail(jTextFieldEmail.getText().toString()) == false) {
            this.jLabelPhone.setText("");
            this.jLabelName.setText("");
            this.jLabelAddress.setText("");
            this.jLabelEmail.setText(rb.getString("EmailWrong"));
            return false;
        } else {
            ct.setEmail(jTextFieldEmail.getText());
            ct.setPhone(jTextFieldPhone.getText());
            ct.setNamecustomer(jTextFieldName.getText());
            ct.setHomeaddress(jTextFieldAddress.getText());
            ct.setSex(jComboBoxSex.getSelectedItem().toString());
        }
        return true;
    }
    private void DisplayCustomer() {
        r = this.jTableCustomer.getSelectedRow();
        idct = Integer.parseInt(this.jTableCustomer.getValueAt(r, 0).toString());
        String name = this.jTableCustomer.getValueAt(r, 1).toString();
        String sex = this.jTableCustomer.getValueAt(r, 2).toString();
        String address = this.jTableCustomer.getValueAt(r, 3).toString();
        String email = this.jTableCustomer.getValueAt(r, 4).toString();
        String phone = this.jTableCustomer.getValueAt(r, 5).toString().trim();
        this.jTextFieldName.setText(name);
        this.jTextFieldAddress.setText(address);
        this.jTextFieldEmail.setText(email);
        this.jTextFieldPhone.setText(phone);
        this.jComboBoxSex.setSelectedItem(sex);
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        buttonGroup4 = new javax.swing.ButtonGroup();
        buttonGroup5 = new javax.swing.ButtonGroup();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanelCustomer = new javax.swing.JPanel();
        jPanelTableCustomer = new javax.swing.JPanel();
        jPanelInfomationCustomer = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jPanel83 = new javax.swing.JPanel();
        jPanel105 = new javax.swing.JPanel();
        btnAdd = new javax.swing.JButton();
        btnEdit = new javax.swing.JButton();
        Clean = new javax.swing.JButton();
        btnDelete = new javax.swing.JButton();
        jPanel84 = new javax.swing.JPanel();
        jPanel85 = new javax.swing.JPanel();
        lblName = new javax.swing.JLabel();
        lblName4 = new javax.swing.JLabel();
        lblAddress = new javax.swing.JLabel();
        lblName1 = new javax.swing.JLabel();
        lblPhone = new javax.swing.JLabel();
        lblName2 = new javax.swing.JLabel();
        lblEmail = new javax.swing.JLabel();
        lblName3 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jPanel86 = new javax.swing.JPanel();
        jTextFieldName = new javax.swing.JTextField();
        jLabelName = new javax.swing.JLabel();
        jTextFieldAddress = new javax.swing.JTextField();
        jLabelAddress = new javax.swing.JLabel();
        jTextFieldPhone = new javax.swing.JTextField();
        jLabelPhone = new javax.swing.JLabel();
        jTextFieldEmail = new javax.swing.JTextField();
        jLabelEmail = new javax.swing.JLabel();
        jPanel87 = new javax.swing.JPanel();
        jPanel88 = new javax.swing.JPanel();
        jComboBoxSex = new javax.swing.JComboBox();
        jPanel89 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jPanel94 = new javax.swing.JPanel();
        jPanel96 = new javax.swing.JPanel();
        jPanel98 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jPanel99 = new javax.swing.JPanel();
        txtSearch = new javax.swing.JTextField();
        jPanel97 = new javax.swing.JPanel();
        jPanel100 = new javax.swing.JPanel();
        jButton11 = new javax.swing.JButton();
        jPanel101 = new javax.swing.JPanel();
        jPanel102 = new javax.swing.JPanel();
        JRadioButtonID = new javax.swing.JRadioButton();
        jPanel103 = new javax.swing.JPanel();
        JRadioButtonName = new javax.swing.JRadioButton();
        jPanel95 = new javax.swing.JPanel();
        jPanel106 = new javax.swing.JPanel();
        jPanel108 = new javax.swing.JPanel();
        jPanel109 = new javax.swing.JPanel();
        jPanel110 = new javax.swing.JPanel();
        jButtonSelectCustomer = new javax.swing.JButton();
        jPanel107 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jPanel111 = new javax.swing.JPanel();
        jPanel93 = new javax.swing.JPanel();
        scpCustomer = new javax.swing.JScrollPane();
        jTableCustomer = new javax.swing.JTable();
        jPanelOrder = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jPanelLeft = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jPanel12 = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jButton2 = new javax.swing.JButton();
        jPanel14 = new javax.swing.JPanel();
        jPanel76 = new javax.swing.JPanel();
        jPanel77 = new javax.swing.JPanel();
        jPanel90 = new javax.swing.JPanel();
        jRadioButtonID = new javax.swing.JRadioButton();
        jPanel91 = new javax.swing.JPanel();
        jRadioButtonName = new javax.swing.JRadioButton();
        jPanel78 = new javax.swing.JPanel();
        txtSearchOrder = new javax.swing.JTextField();
        jPanel10 = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        jButton3 = new javax.swing.JButton();
        jPanel17 = new javax.swing.JPanel();
        jButton4 = new javax.swing.JButton();
        jPanel15 = new javax.swing.JPanel();
        jPanel18 = new javax.swing.JPanel();
        jRadioButtonOrder = new javax.swing.JRadioButton();
        jPanel19 = new javax.swing.JPanel();
        jRadioButtonCustomer = new javax.swing.JRadioButton();
        jPanel20 = new javax.swing.JPanel();
        jRadioButtonDispatch = new javax.swing.JRadioButton();
        jPanel7 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        JTable = new javax.swing.JScrollPane();
        jTableOrder = new javax.swing.JTable();
        jPanel21 = new javax.swing.JPanel();
        jPanel22 = new javax.swing.JPanel();
        jPanel23 = new javax.swing.JPanel();
        jPanel24 = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        jPanel25 = new javax.swing.JPanel();
        jTextFieldNameCustomer = new javax.swing.JTextField();
        jPanel26 = new javax.swing.JPanel();
        jPanel27 = new javax.swing.JPanel();
        jPanel28 = new javax.swing.JPanel();
        jPanel29 = new javax.swing.JPanel();
        jButton8 = new javax.swing.JButton();
        jPanel30 = new javax.swing.JPanel();
        jButtonAddOrder = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jButton10 = new javax.swing.JButton();
        jPanel31 = new javax.swing.JPanel();
        jPanel32 = new javax.swing.JPanel();
        jPanel33 = new javax.swing.JPanel();
        jPanel34 = new javax.swing.JPanel();
        jPanel35 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        jPanel36 = new javax.swing.JPanel();
        jTextFieldNameProduces = new javax.swing.JTextField();
        jPanel37 = new javax.swing.JPanel();
        jPanel38 = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jPanel39 = new javax.swing.JPanel();
        jTextFieldIDOrder = new javax.swing.JTextField();
        jPanel72 = new javax.swing.JPanel();
        jPanel73 = new javax.swing.JPanel();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jPanel104 = new javax.swing.JPanel();
        jPanel40 = new javax.swing.JPanel();
        scpCustomer2 = new javax.swing.JScrollPane();
        jTableDispatch = new javax.swing.JTable();
        jPanel41 = new javax.swing.JPanel();
        jPanel42 = new javax.swing.JPanel();
        jPanel43 = new javax.swing.JPanel();
        jPanel44 = new javax.swing.JPanel();
        jButtonGiveID = new javax.swing.JButton();
        jPanel45 = new javax.swing.JPanel();
        jPanel46 = new javax.swing.JPanel();
        jPanel47 = new javax.swing.JPanel();
        jPanel48 = new javax.swing.JPanel();
        jPanel50 = new javax.swing.JPanel();
        txtSearchProduct = new javax.swing.JTextField();
        jPanel51 = new javax.swing.JPanel();
        jPanel59 = new javax.swing.JPanel();
        jButtonSearchProduct = new javax.swing.JButton();
        jPanel70 = new javax.swing.JPanel();
        jPanel71 = new javax.swing.JPanel();
        jRadioButtonIdProduce = new javax.swing.JRadioButton();
        jPanel75 = new javax.swing.JPanel();
        jRadioButtonNameProduce = new javax.swing.JRadioButton();
        jPanel52 = new javax.swing.JPanel();
        jPanel53 = new javax.swing.JPanel();
        jPanel54 = new javax.swing.JPanel();
        jPanel55 = new javax.swing.JPanel();
        jRadioButtonProduce = new javax.swing.JRadioButton();
        jPanel56 = new javax.swing.JPanel();
        jPanel57 = new javax.swing.JPanel();
        jRadioButtonProducer = new javax.swing.JRadioButton();
        jPanel82 = new javax.swing.JPanel();
        jButton12 = new javax.swing.JButton();
        jPanel58 = new javax.swing.JPanel();
        jPanel60 = new javax.swing.JPanel();
        scpCustomer3 = new javax.swing.JScrollPane();
        jTableProduce = new javax.swing.JTable();
        jPanel61 = new javax.swing.JPanel();
        jPanel62 = new javax.swing.JPanel();
        jPanel63 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jPanel64 = new javax.swing.JPanel();
        jTextFieldNameProduce = new javax.swing.JTextField();
        jTextFieldPrice = new javax.swing.JTextField();
        jPanel65 = new javax.swing.JPanel();
        jPanel66 = new javax.swing.JPanel();
        jTextFieldWarranty = new javax.swing.JTextField();
        jPanel67 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jPanel68 = new javax.swing.JPanel();
        jPanel69 = new javax.swing.JPanel();
        jPanel79 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jPanel80 = new javax.swing.JPanel();
        jPanel81 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextAreaInformation = new javax.swing.JTextArea();
        jLabel8 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();

        setClosable(true);
        setIconifiable(true);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(bugreportingsystem.BugReportingSystemApp.class).getContext().getResourceMap(JInternalFrameManageOrder.class);
        setFrameIcon(resourceMap.getIcon("Form.frameIcon")); // NOI18N
        setMinimumSize(new java.awt.Dimension(1005, 595));
        setName("Form"); // NOI18N
        setPreferredSize(new java.awt.Dimension(1018, 607));

        jTabbedPane1.setForeground(resourceMap.getColor("jTabbedPane1.foreground")); // NOI18N
        jTabbedPane1.setFont(resourceMap.getFont("jTabbedPane1.font")); // NOI18N
        jTabbedPane1.setName("jTabbedPane1"); // NOI18N
        jTabbedPane1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTabbedPane1MouseClicked(evt);
            }
        });

        jPanelCustomer.setName("jPanelCustomer"); // NOI18N
        jPanelCustomer.setLayout(new java.awt.BorderLayout());

        jPanelTableCustomer.setName("jPanelTableCustomer"); // NOI18N
        jPanelTableCustomer.setLayout(new java.awt.BorderLayout(0, 15));

        jPanelInfomationCustomer.setName("jPanelInfomationCustomer"); // NOI18N
        jPanelInfomationCustomer.setPreferredSize(new java.awt.Dimension(1086, 320));
        jPanelInfomationCustomer.setLayout(new java.awt.BorderLayout());

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel2.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel2.border.titleFont"), resourceMap.getColor("jPanel2.border.titleColor"))); // NOI18N
        jPanel2.setName("jPanel2"); // NOI18N
        jPanel2.setPreferredSize(new java.awt.Dimension(460, 400));
        jPanel2.setLayout(new java.awt.BorderLayout(0, 10));

        jPanel83.setName("jPanel83"); // NOI18N
        jPanel83.setPreferredSize(new java.awt.Dimension(388, 25));
        jPanel83.setLayout(new java.awt.BorderLayout());

        jPanel105.setName("jPanel105"); // NOI18N
        jPanel105.setPreferredSize(new java.awt.Dimension(378, 20));
        jPanel105.setLayout(new java.awt.GridLayout(1, 4, 4, 0));

        btnAdd.setIcon(resourceMap.getIcon("btnAdd.icon")); // NOI18N
        btnAdd.setText(resourceMap.getString("btnAdd.text")); // NOI18N
        btnAdd.setName("btnAdd"); // NOI18N
        btnAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddActionPerformed(evt);
            }
        });
        jPanel105.add(btnAdd);

        btnEdit.setIcon(resourceMap.getIcon("btnEdit.icon")); // NOI18N
        btnEdit.setText(resourceMap.getString("btnEdit.text")); // NOI18N
        btnEdit.setName("btnEdit"); // NOI18N
        btnEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditActionPerformed(evt);
            }
        });
        jPanel105.add(btnEdit);

        Clean.setIcon(resourceMap.getIcon("Clean.icon")); // NOI18N
        Clean.setText(resourceMap.getString("Clean.text")); // NOI18N
        Clean.setName("Clean"); // NOI18N
        Clean.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CleanActionPerformed(evt);
            }
        });
        jPanel105.add(Clean);

        btnDelete.setIcon(resourceMap.getIcon("btnDelete.icon")); // NOI18N
        btnDelete.setText(resourceMap.getString("btnDelete.text")); // NOI18N
        btnDelete.setName("btnDelete"); // NOI18N
        btnDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeleteActionPerformed(evt);
            }
        });
        jPanel105.add(btnDelete);

        jPanel83.add(jPanel105, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel83, java.awt.BorderLayout.PAGE_END);

        jPanel84.setName("jPanel84"); // NOI18N
        jPanel84.setLayout(new java.awt.BorderLayout(20, 0));

        jPanel85.setName("jPanel85"); // NOI18N
        jPanel85.setLayout(new java.awt.GridLayout(9, 1));

        lblName.setText(resourceMap.getString("lblName.text")); // NOI18N
        lblName.setName("lblName"); // NOI18N
        jPanel85.add(lblName);

        lblName4.setName("lblName4"); // NOI18N
        jPanel85.add(lblName4);

        lblAddress.setText(resourceMap.getString("lblAddress.text")); // NOI18N
        lblAddress.setName("lblAddress"); // NOI18N
        jPanel85.add(lblAddress);

        lblName1.setName("lblName1"); // NOI18N
        jPanel85.add(lblName1);

        lblPhone.setText(resourceMap.getString("lblPhone.text")); // NOI18N
        lblPhone.setName("lblPhone"); // NOI18N
        jPanel85.add(lblPhone);

        lblName2.setName("lblName2"); // NOI18N
        jPanel85.add(lblName2);

        lblEmail.setText(resourceMap.getString("lblEmail.text")); // NOI18N
        lblEmail.setName("lblEmail"); // NOI18N
        jPanel85.add(lblEmail);

        lblName3.setName("lblName3"); // NOI18N
        jPanel85.add(lblName3);

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N
        jPanel85.add(jLabel2);

        jPanel84.add(jPanel85, java.awt.BorderLayout.LINE_START);

        jPanel86.setName("jPanel86"); // NOI18N
        jPanel86.setLayout(new java.awt.GridLayout(9, 1));

        jTextFieldName.setName("jTextFieldName"); // NOI18N
        jPanel86.add(jTextFieldName);

        jLabelName.setFont(resourceMap.getFont("jLabelName.font")); // NOI18N
        jLabelName.setForeground(resourceMap.getColor("jLabelName.foreground")); // NOI18N
        jLabelName.setText(resourceMap.getString("jLabelName.text")); // NOI18N
        jLabelName.setName("jLabelName"); // NOI18N
        jPanel86.add(jLabelName);

        jTextFieldAddress.setName("jTextFieldAddress"); // NOI18N
        jPanel86.add(jTextFieldAddress);

        jLabelAddress.setFont(resourceMap.getFont("jLabelAddress.font")); // NOI18N
        jLabelAddress.setForeground(resourceMap.getColor("jLabelAddress.foreground")); // NOI18N
        jLabelAddress.setText(resourceMap.getString("jLabelAddress.text")); // NOI18N
        jLabelAddress.setName("jLabelAddress"); // NOI18N
        jPanel86.add(jLabelAddress);

        jTextFieldPhone.setName("jTextFieldPhone"); // NOI18N
        jPanel86.add(jTextFieldPhone);

        jLabelPhone.setFont(resourceMap.getFont("jLabelPhone.font")); // NOI18N
        jLabelPhone.setForeground(resourceMap.getColor("jLabelPhone.foreground")); // NOI18N
        jLabelPhone.setText(resourceMap.getString("jLabelPhone.text")); // NOI18N
        jLabelPhone.setName("jLabelPhone"); // NOI18N
        jPanel86.add(jLabelPhone);

        jTextFieldEmail.setName("jTextFieldEmail"); // NOI18N
        jPanel86.add(jTextFieldEmail);

        jLabelEmail.setFont(resourceMap.getFont("jLabelEmail.font")); // NOI18N
        jLabelEmail.setForeground(resourceMap.getColor("jLabelEmail.foreground")); // NOI18N
        jLabelEmail.setText(resourceMap.getString("jLabelEmail.text")); // NOI18N
        jLabelEmail.setName("jLabelEmail"); // NOI18N
        jPanel86.add(jLabelEmail);

        jPanel87.setName("jPanel87"); // NOI18N
        jPanel87.setLayout(new java.awt.BorderLayout());

        jPanel88.setName("jPanel88"); // NOI18N
        jPanel88.setLayout(new java.awt.BorderLayout());

        jComboBoxSex.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Male", "Female" }));
        jComboBoxSex.setName("jComboBoxSex"); // NOI18N
        jPanel88.add(jComboBoxSex, java.awt.BorderLayout.CENTER);

        jPanel87.add(jPanel88, java.awt.BorderLayout.LINE_START);

        jPanel89.setName("jPanel89"); // NOI18N

        javax.swing.GroupLayout jPanel89Layout = new javax.swing.GroupLayout(jPanel89);
        jPanel89.setLayout(jPanel89Layout);
        jPanel89Layout.setHorizontalGroup(
            jPanel89Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 330, Short.MAX_VALUE)
        );
        jPanel89Layout.setVerticalGroup(
            jPanel89Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 23, Short.MAX_VALUE)
        );

        jPanel87.add(jPanel89, java.awt.BorderLayout.CENTER);

        jPanel86.add(jPanel87);

        jPanel84.add(jPanel86, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel84, java.awt.BorderLayout.CENTER);

        jPanel1.setName("jPanel1"); // NOI18N
        jPanel1.setPreferredSize(new java.awt.Dimension(448, 10));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 448, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 10, Short.MAX_VALUE)
        );

        jPanel2.add(jPanel1, java.awt.BorderLayout.PAGE_START);

        jPanelInfomationCustomer.add(jPanel2, java.awt.BorderLayout.LINE_START);

        jPanel3.setName("jPanel3"); // NOI18N
        jPanel3.setPreferredSize(new java.awt.Dimension(460, 400));
        jPanel3.setLayout(new java.awt.BorderLayout());

        jPanel94.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel94.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel94.border.titleFont"), resourceMap.getColor("jPanel94.border.titleColor"))); // NOI18N
        jPanel94.setName("jPanel94"); // NOI18N
        jPanel94.setPreferredSize(new java.awt.Dimension(400, 100));
        jPanel94.setLayout(new java.awt.GridLayout(2, 1, 0, 15));

        jPanel96.setName("jPanel96"); // NOI18N
        jPanel96.setLayout(new java.awt.BorderLayout(20, 0));

        jPanel98.setName("jPanel98"); // NOI18N
        jPanel98.setPreferredSize(new java.awt.Dimension(115, 33));
        jPanel98.setLayout(new java.awt.BorderLayout());

        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jPanel98.add(jButton1, java.awt.BorderLayout.CENTER);

        jPanel96.add(jPanel98, java.awt.BorderLayout.LINE_END);

        jPanel99.setName("jPanel99"); // NOI18N
        jPanel99.setLayout(new java.awt.BorderLayout());

        txtSearch.setName("txtSearch"); // NOI18N
        txtSearch.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtSearchKeyReleased(evt);
            }
        });
        jPanel99.add(txtSearch, java.awt.BorderLayout.CENTER);

        jPanel96.add(jPanel99, java.awt.BorderLayout.CENTER);

        jPanel94.add(jPanel96);

        jPanel97.setName("jPanel97"); // NOI18N
        jPanel97.setLayout(new java.awt.BorderLayout(20, 0));

        jPanel100.setName("jPanel100"); // NOI18N
        jPanel100.setPreferredSize(new java.awt.Dimension(115, 33));
        jPanel100.setLayout(new java.awt.BorderLayout());

        jButton11.setIcon(resourceMap.getIcon("jButton11.icon")); // NOI18N
        jButton11.setText(resourceMap.getString("jButton11.text")); // NOI18N
        jButton11.setName("jButton11"); // NOI18N
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });
        jPanel100.add(jButton11, java.awt.BorderLayout.CENTER);

        jPanel97.add(jPanel100, java.awt.BorderLayout.LINE_END);

        jPanel101.setName("jPanel101"); // NOI18N
        jPanel101.setLayout(new java.awt.BorderLayout());

        jPanel102.setName("jPanel102"); // NOI18N
        jPanel102.setPreferredSize(new java.awt.Dimension(100, 50));
        jPanel102.setLayout(new java.awt.BorderLayout());

        buttonGroup1.add(JRadioButtonID);
        JRadioButtonID.setSelected(true);
        JRadioButtonID.setText(resourceMap.getString("JRadioButtonID.text")); // NOI18N
        JRadioButtonID.setName("JRadioButtonID"); // NOI18N
        jPanel102.add(JRadioButtonID, java.awt.BorderLayout.CENTER);

        jPanel101.add(jPanel102, java.awt.BorderLayout.LINE_START);

        jPanel103.setName("jPanel103"); // NOI18N
        jPanel103.setLayout(new java.awt.BorderLayout());

        buttonGroup1.add(JRadioButtonName);
        JRadioButtonName.setText(resourceMap.getString("JRadioButtonName.text")); // NOI18N
        JRadioButtonName.setName("JRadioButtonName"); // NOI18N
        jPanel103.add(JRadioButtonName, java.awt.BorderLayout.CENTER);

        jPanel101.add(jPanel103, java.awt.BorderLayout.CENTER);

        jPanel97.add(jPanel101, java.awt.BorderLayout.CENTER);

        jPanel94.add(jPanel97);

        jPanel3.add(jPanel94, java.awt.BorderLayout.PAGE_START);

        jPanel95.setName("jPanel95"); // NOI18N
        jPanel95.setLayout(new java.awt.BorderLayout());

        jPanel106.setName("jPanel106"); // NOI18N
        jPanel106.setPreferredSize(new java.awt.Dimension(400, 30));
        jPanel106.setLayout(new java.awt.BorderLayout());

        jPanel108.setName("jPanel108"); // NOI18N
        jPanel108.setPreferredSize(new java.awt.Dimension(5, 30));

        javax.swing.GroupLayout jPanel108Layout = new javax.swing.GroupLayout(jPanel108);
        jPanel108.setLayout(jPanel108Layout);
        jPanel108Layout.setHorizontalGroup(
            jPanel108Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 5, Short.MAX_VALUE)
        );
        jPanel108Layout.setVerticalGroup(
            jPanel108Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel106.add(jPanel108, java.awt.BorderLayout.LINE_END);

        jPanel109.setName("jPanel109"); // NOI18N
        jPanel109.setPreferredSize(new java.awt.Dimension(180, 30));

        javax.swing.GroupLayout jPanel109Layout = new javax.swing.GroupLayout(jPanel109);
        jPanel109.setLayout(jPanel109Layout);
        jPanel109Layout.setHorizontalGroup(
            jPanel109Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 180, Short.MAX_VALUE)
        );
        jPanel109Layout.setVerticalGroup(
            jPanel109Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel106.add(jPanel109, java.awt.BorderLayout.LINE_START);

        jPanel110.setName("jPanel110"); // NOI18N
        jPanel110.setLayout(new java.awt.BorderLayout());

        jButtonSelectCustomer.setIcon(resourceMap.getIcon("jButtonSelectCustomer.icon")); // NOI18N
        jButtonSelectCustomer.setText(resourceMap.getString("jButtonSelectCustomer.text")); // NOI18N
        jButtonSelectCustomer.setName("jButtonSelectCustomer"); // NOI18N
        jButtonSelectCustomer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSelectCustomerActionPerformed(evt);
            }
        });
        jPanel110.add(jButtonSelectCustomer, java.awt.BorderLayout.CENTER);

        jPanel106.add(jPanel110, java.awt.BorderLayout.CENTER);

        jPanel95.add(jPanel106, java.awt.BorderLayout.PAGE_END);

        jPanel107.setName("jPanel107"); // NOI18N

        javax.swing.GroupLayout jPanel107Layout = new javax.swing.GroupLayout(jPanel107);
        jPanel107.setLayout(jPanel107Layout);
        jPanel107Layout.setHorizontalGroup(
            jPanel107Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 460, Short.MAX_VALUE)
        );
        jPanel107Layout.setVerticalGroup(
            jPanel107Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 170, Short.MAX_VALUE)
        );

        jPanel95.add(jPanel107, java.awt.BorderLayout.CENTER);

        jPanel3.add(jPanel95, java.awt.BorderLayout.CENTER);

        jPanelInfomationCustomer.add(jPanel3, java.awt.BorderLayout.LINE_END);

        jPanel5.setName("jPanel5"); // NOI18N
        jPanel5.setPreferredSize(new java.awt.Dimension(50, 0));
        jPanel5.setLayout(new java.awt.BorderLayout());
        jPanelInfomationCustomer.add(jPanel5, java.awt.BorderLayout.CENTER);

        jPanel111.setName("jPanel111"); // NOI18N
        jPanel111.setPreferredSize(new java.awt.Dimension(969, 20));

        javax.swing.GroupLayout jPanel111Layout = new javax.swing.GroupLayout(jPanel111);
        jPanel111.setLayout(jPanel111Layout);
        jPanel111Layout.setHorizontalGroup(
            jPanel111Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 969, Short.MAX_VALUE)
        );
        jPanel111Layout.setVerticalGroup(
            jPanel111Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );

        jPanelInfomationCustomer.add(jPanel111, java.awt.BorderLayout.PAGE_START);

        jPanelTableCustomer.add(jPanelInfomationCustomer, java.awt.BorderLayout.PAGE_START);

        jPanel93.setName("jPanel93"); // NOI18N
        jPanel93.setPreferredSize(new java.awt.Dimension(452, 390));
        jPanel93.setLayout(new java.awt.BorderLayout());

        scpCustomer.setName("scpCustomer"); // NOI18N
        scpCustomer.setPreferredSize(new java.awt.Dimension(452, 390));

        jTableCustomer.setName("jTableCustomer"); // NOI18N
        jTableCustomer.setPreferredSize(new java.awt.Dimension(0, 390));
        jTableCustomer.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jTableCustomer.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTableCustomerMouseClicked(evt);
            }
        });
        jTableCustomer.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTableCustomerKeyReleased(evt);
            }
        });
        scpCustomer.setViewportView(jTableCustomer);

        jPanel93.add(scpCustomer, java.awt.BorderLayout.CENTER);

        jPanelTableCustomer.add(jPanel93, java.awt.BorderLayout.CENTER);

        jPanelCustomer.add(jPanelTableCustomer, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab("Customer", jPanelCustomer);

        jPanelOrder.setName("jPanelOrder"); // NOI18N
        jPanelOrder.setLayout(new java.awt.BorderLayout());

        jPanel6.setName("jPanel6"); // NOI18N
        jPanel6.setLayout(new java.awt.GridLayout(1, 2, 5, 0));

        jPanelLeft.setName("jPanelLeft"); // NOI18N
        jPanelLeft.setLayout(new java.awt.BorderLayout());

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel4.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel4.border.titleFont"), resourceMap.getColor("jPanel4.border.titleColor"))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N
        jPanel4.setPreferredSize(new java.awt.Dimension(599, 85));
        jPanel4.setLayout(new java.awt.GridLayout(2, 1, 0, 5));

        jPanel9.setName("jPanel9"); // NOI18N
        jPanel9.setLayout(new java.awt.BorderLayout());

        jPanel12.setName("jPanel12"); // NOI18N
        jPanel12.setPreferredSize(new java.awt.Dimension(548, 100));
        jPanel12.setLayout(new java.awt.BorderLayout());

        jPanel13.setName("jPanel13"); // NOI18N
        jPanel13.setPreferredSize(new java.awt.Dimension(115, 33));
        jPanel13.setLayout(new java.awt.BorderLayout());

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/Search1.Png"))); // NOI18N
        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jPanel13.add(jButton2, java.awt.BorderLayout.CENTER);

        jPanel12.add(jPanel13, java.awt.BorderLayout.LINE_END);

        jPanel14.setName("jPanel14"); // NOI18N
        jPanel14.setPreferredSize(new java.awt.Dimension(0, 111));

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel12.add(jPanel14, java.awt.BorderLayout.LINE_START);

        jPanel76.setName("jPanel76"); // NOI18N
        jPanel76.setLayout(new java.awt.BorderLayout(20, 0));

        jPanel77.setName("jPanel77"); // NOI18N
        jPanel77.setPreferredSize(new java.awt.Dimension(150, 111));
        jPanel77.setLayout(new java.awt.BorderLayout());

        jPanel90.setName("jPanel90"); // NOI18N
        jPanel90.setPreferredSize(new java.awt.Dimension(70, 110));
        jPanel90.setLayout(new java.awt.BorderLayout());

        buttonGroup2.add(jRadioButtonID);
        jRadioButtonID.setText(resourceMap.getString("jRadioButtonID.text")); // NOI18N
        jRadioButtonID.setName("jRadioButtonID"); // NOI18N
        jRadioButtonID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonIDActionPerformed(evt);
            }
        });
        jPanel90.add(jRadioButtonID, java.awt.BorderLayout.CENTER);

        jPanel77.add(jPanel90, java.awt.BorderLayout.LINE_START);

        jPanel91.setName("jPanel91"); // NOI18N
        jPanel91.setLayout(new javax.swing.BoxLayout(jPanel91, javax.swing.BoxLayout.LINE_AXIS));

        buttonGroup2.add(jRadioButtonName);
        jRadioButtonName.setText(resourceMap.getString("jRadioButtonName.text")); // NOI18N
        jRadioButtonName.setName("jRadioButtonName"); // NOI18N
        jRadioButtonName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonNameActionPerformed(evt);
            }
        });
        jPanel91.add(jRadioButtonName);

        jPanel77.add(jPanel91, java.awt.BorderLayout.CENTER);

        jPanel76.add(jPanel77, java.awt.BorderLayout.LINE_END);

        jPanel78.setName("jPanel78"); // NOI18N
        jPanel78.setPreferredSize(new java.awt.Dimension(230, 111));
        jPanel78.setLayout(new java.awt.BorderLayout());

        txtSearchOrder.setName("txtSearchOrder"); // NOI18N
        jPanel78.add(txtSearchOrder, java.awt.BorderLayout.CENTER);

        jPanel76.add(jPanel78, java.awt.BorderLayout.CENTER);

        jPanel12.add(jPanel76, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel12, java.awt.BorderLayout.CENTER);

        jPanel4.add(jPanel9);

        jPanel10.setName("jPanel10"); // NOI18N
        jPanel10.setLayout(new java.awt.BorderLayout());

        jPanel11.setName("jPanel11"); // NOI18N
        jPanel11.setPreferredSize(new java.awt.Dimension(215, 139));
        jPanel11.setLayout(new java.awt.BorderLayout(5, 0));

        jPanel16.setName("jPanel16"); // NOI18N
        jPanel16.setPreferredSize(new java.awt.Dimension(115, 25));
        jPanel16.setLayout(new java.awt.BorderLayout());

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/Refresh.png"))); // NOI18N
        jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
        jButton3.setName("jButton3"); // NOI18N
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        jPanel16.add(jButton3, java.awt.BorderLayout.CENTER);

        jPanel11.add(jPanel16, java.awt.BorderLayout.LINE_END);

        jPanel17.setName("jPanel17"); // NOI18N
        jPanel17.setLayout(new java.awt.BorderLayout());

        jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
        jButton4.setName("jButton4"); // NOI18N
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        jPanel17.add(jButton4, java.awt.BorderLayout.CENTER);

        jPanel11.add(jPanel17, java.awt.BorderLayout.CENTER);

        jPanel10.add(jPanel11, java.awt.BorderLayout.LINE_END);

        jPanel15.setName("jPanel15"); // NOI18N
        jPanel15.setPreferredSize(new java.awt.Dimension(340, 138));
        jPanel15.setLayout(new java.awt.BorderLayout());

        jPanel18.setName("jPanel18"); // NOI18N
        jPanel18.setPreferredSize(new java.awt.Dimension(80, 139));
        jPanel18.setLayout(new java.awt.BorderLayout());

        buttonGroup3.add(jRadioButtonOrder);
        jRadioButtonOrder.setText(resourceMap.getString("jRadioButtonOrder.text")); // NOI18N
        jRadioButtonOrder.setName("jRadioButtonOrder"); // NOI18N
        jRadioButtonOrder.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonOrderActionPerformed(evt);
            }
        });
        jPanel18.add(jRadioButtonOrder, java.awt.BorderLayout.CENTER);

        jPanel15.add(jPanel18, java.awt.BorderLayout.LINE_START);

        jPanel19.setName("jPanel19"); // NOI18N
        jPanel19.setPreferredSize(new java.awt.Dimension(100, 138));
        jPanel19.setLayout(new java.awt.BorderLayout());

        buttonGroup3.add(jRadioButtonCustomer);
        jRadioButtonCustomer.setText(resourceMap.getString("jRadioButtonCustomer.text")); // NOI18N
        jRadioButtonCustomer.setName("jRadioButtonCustomer"); // NOI18N
        jRadioButtonCustomer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonCustomerActionPerformed(evt);
            }
        });
        jPanel19.add(jRadioButtonCustomer, java.awt.BorderLayout.CENTER);

        jPanel15.add(jPanel19, java.awt.BorderLayout.LINE_END);

        jPanel20.setName("jPanel20"); // NOI18N
        jPanel20.setPreferredSize(new java.awt.Dimension(75, 25));
        jPanel20.setLayout(new java.awt.BorderLayout());

        buttonGroup3.add(jRadioButtonDispatch);
        jRadioButtonDispatch.setText(resourceMap.getString("jRadioButtonDispatch.text")); // NOI18N
        jRadioButtonDispatch.setName("jRadioButtonDispatch"); // NOI18N
        jRadioButtonDispatch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonDispatchActionPerformed(evt);
            }
        });
        jPanel20.add(jRadioButtonDispatch, java.awt.BorderLayout.CENTER);

        jPanel15.add(jPanel20, java.awt.BorderLayout.CENTER);

        jPanel10.add(jPanel15, java.awt.BorderLayout.CENTER);

        jPanel4.add(jPanel10);

        jPanelLeft.add(jPanel4, java.awt.BorderLayout.PAGE_START);

        jPanel7.setName("jPanel7"); // NOI18N
        jPanel7.setLayout(new java.awt.BorderLayout());

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel8.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel8.border.titleFont"), resourceMap.getColor("jPanel8.border.titleColor"))); // NOI18N
        jPanel8.setName("jPanel8"); // NOI18N
        jPanel8.setPreferredSize(new java.awt.Dimension(464, 150));
        jPanel8.setLayout(new java.awt.BorderLayout());

        JTable.setName("JTable"); // NOI18N
        JTable.setPreferredSize(new java.awt.Dimension(452, 410));

        jTableOrder.setName("jTableOrder"); // NOI18N
        jTableOrder.setPreferredSize(new java.awt.Dimension(0, 410));
        jTableOrder.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jTableOrder.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTableOrderMouseClicked(evt);
            }
        });
        jTableOrder.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTableOrderKeyReleased(evt);
            }
        });
        JTable.setViewportView(jTableOrder);

        jPanel8.add(JTable, java.awt.BorderLayout.CENTER);

        jPanel7.add(jPanel8, java.awt.BorderLayout.PAGE_START);

        jPanel21.setName("jPanel21"); // NOI18N
        jPanel21.setLayout(new java.awt.BorderLayout());

        jPanel22.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel22.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel22.border.titleFont"), resourceMap.getColor("jPanel22.border.titleColor"))); // NOI18N
        jPanel22.setName("jPanel22"); // NOI18N
        jPanel22.setPreferredSize(new java.awt.Dimension(482, 85));
        jPanel22.setLayout(new java.awt.GridLayout(2, 1, 0, 5));

        jPanel23.setName("jPanel23"); // NOI18N
        jPanel23.setPreferredSize(new java.awt.Dimension(230, 30));
        jPanel23.setLayout(new java.awt.BorderLayout(15, 0));

        jPanel24.setName("jPanel24"); // NOI18N
        jPanel24.setLayout(new java.awt.BorderLayout());

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N
        jPanel24.add(jLabel9, java.awt.BorderLayout.CENTER);

        jPanel23.add(jPanel24, java.awt.BorderLayout.LINE_START);

        jPanel25.setName("jPanel25"); // NOI18N
        jPanel25.setLayout(new java.awt.BorderLayout());

        jTextFieldNameCustomer.setEditable(false);
        jTextFieldNameCustomer.setText(resourceMap.getString("jTextFieldNameCustomer.text")); // NOI18N
        jTextFieldNameCustomer.setName("jTextFieldNameCustomer"); // NOI18N
        jPanel25.add(jTextFieldNameCustomer, java.awt.BorderLayout.CENTER);

        jPanel23.add(jPanel25, java.awt.BorderLayout.CENTER);

        jPanel22.add(jPanel23);

        jPanel26.setName("jPanel26"); // NOI18N
        jPanel26.setLayout(new java.awt.BorderLayout(5, 0));

        jPanel27.setName("jPanel27"); // NOI18N
        jPanel27.setPreferredSize(new java.awt.Dimension(0, 31));

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel26.add(jPanel27, java.awt.BorderLayout.LINE_START);

        jPanel28.setName("jPanel28"); // NOI18N
        jPanel28.setLayout(new java.awt.BorderLayout(5, 0));

        jPanel29.setName("jPanel29"); // NOI18N
        jPanel29.setLayout(new java.awt.BorderLayout());

        jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/add.png"))); // NOI18N
        jButton8.setText(resourceMap.getString("jButton8.text")); // NOI18N
        jButton8.setName("jButton8"); // NOI18N
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });
        jPanel29.add(jButton8, java.awt.BorderLayout.CENTER);

        jPanel28.add(jPanel29, java.awt.BorderLayout.LINE_START);

        jPanel30.setName("jPanel30"); // NOI18N
        jPanel30.setLayout(new java.awt.GridLayout(1, 3, 5, 0));

        jButtonAddOrder.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/add.png"))); // NOI18N
        jButtonAddOrder.setText(resourceMap.getString("jButtonAddOrder.text")); // NOI18N
        jButtonAddOrder.setName("jButtonAddOrder"); // NOI18N
        jButtonAddOrder.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAddOrderActionPerformed(evt);
            }
        });
        jPanel30.add(jButtonAddOrder);

        jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/edit.png"))); // NOI18N
        jButton5.setText(resourceMap.getString("jButton5.text")); // NOI18N
        jButton5.setName("jButton5"); // NOI18N
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });
        jPanel30.add(jButton5);

        jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/delete1.png"))); // NOI18N
        jButton10.setText(resourceMap.getString("jButton10.text")); // NOI18N
        jButton10.setName("jButton10"); // NOI18N
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });
        jPanel30.add(jButton10);

        jPanel28.add(jPanel30, java.awt.BorderLayout.CENTER);

        jPanel26.add(jPanel28, java.awt.BorderLayout.CENTER);

        jPanel22.add(jPanel26);

        jPanel21.add(jPanel22, java.awt.BorderLayout.PAGE_START);

        jPanel31.setName("jPanel31"); // NOI18N
        jPanel31.setLayout(new java.awt.BorderLayout(0, 10));

        jPanel32.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel32.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel32.border.titleFont"), resourceMap.getColor("jPanel32.border.titleColor"))); // NOI18N
        jPanel32.setMinimumSize(new java.awt.Dimension(247, 73));
        jPanel32.setName("jPanel32"); // NOI18N
        jPanel32.setPreferredSize(new java.awt.Dimension(596, 90));
        jPanel32.setLayout(new java.awt.GridLayout(2, 1, 0, 5));

        jPanel33.setName("jPanel33"); // NOI18N
        jPanel33.setLayout(new java.awt.GridLayout(1, 2, 10, 0));

        jPanel34.setName("jPanel34"); // NOI18N
        jPanel34.setLayout(new java.awt.BorderLayout(10, 0));

        jPanel35.setName("jPanel35"); // NOI18N
        jPanel35.setLayout(new java.awt.GridLayout(1, 0));

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N
        jPanel35.add(jLabel10);

        jPanel34.add(jPanel35, java.awt.BorderLayout.LINE_START);

        jPanel36.setName("jPanel36"); // NOI18N
        jPanel36.setLayout(new java.awt.GridLayout(1, 0));

        jTextFieldNameProduces.setEditable(false);
        jTextFieldNameProduces.setName("jTextFieldNameProduces"); // NOI18N
        jPanel36.add(jTextFieldNameProduces);

        jPanel34.add(jPanel36, java.awt.BorderLayout.CENTER);

        jPanel33.add(jPanel34);

        jPanel37.setName("jPanel37"); // NOI18N
        jPanel37.setLayout(new java.awt.BorderLayout(10, 0));

        jPanel38.setName("jPanel38"); // NOI18N
        jPanel38.setLayout(new java.awt.GridLayout(1, 0));

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N
        jPanel38.add(jLabel11);

        jPanel37.add(jPanel38, java.awt.BorderLayout.LINE_START);

        jPanel39.setName("jPanel39"); // NOI18N
        jPanel39.setLayout(new java.awt.GridLayout(1, 0));

        jTextFieldIDOrder.setEditable(false);
        jTextFieldIDOrder.setName("jTextFieldIDOrder"); // NOI18N
        jPanel39.add(jTextFieldIDOrder);

        jPanel37.add(jPanel39, java.awt.BorderLayout.CENTER);

        jPanel33.add(jPanel37);

        jPanel32.add(jPanel33);

        jPanel72.setName("jPanel72"); // NOI18N
        jPanel72.setLayout(new java.awt.BorderLayout());

        jPanel73.setName("jPanel73"); // NOI18N
        jPanel73.setPreferredSize(new java.awt.Dimension(50, 28));
        jPanel73.setLayout(new java.awt.GridLayout(1, 3, 5, 0));

        jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/add.png"))); // NOI18N
        jButton6.setText(resourceMap.getString("jButton6.text")); // NOI18N
        jButton6.setName("jButton6"); // NOI18N
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });
        jPanel73.add(jButton6);

        jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/edit.png"))); // NOI18N
        jButton7.setText(resourceMap.getString("jButton7.text")); // NOI18N
        jButton7.setName("jButton7"); // NOI18N
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });
        jPanel73.add(jButton7);

        jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/delete1.png"))); // NOI18N
        jButton9.setText(resourceMap.getString("jButton9.text")); // NOI18N
        jButton9.setName("jButton9"); // NOI18N
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });
        jPanel73.add(jButton9);

        jPanel72.add(jPanel73, java.awt.BorderLayout.CENTER);

        jPanel104.setName("jPanel104"); // NOI18N

        javax.swing.GroupLayout jPanel104Layout = new javax.swing.GroupLayout(jPanel104);
        jPanel104.setLayout(jPanel104Layout);
        jPanel104Layout.setHorizontalGroup(
            jPanel104Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel104Layout.setVerticalGroup(
            jPanel104Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 28, Short.MAX_VALUE)
        );

        jPanel72.add(jPanel104, java.awt.BorderLayout.LINE_START);

        jPanel32.add(jPanel72);

        jPanel31.add(jPanel32, java.awt.BorderLayout.PAGE_START);

        jPanel40.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel40.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel40.border.titleFont"), resourceMap.getColor("jPanel40.border.titleColor"))); // NOI18N
        jPanel40.setName("jPanel40"); // NOI18N
        jPanel40.setLayout(new java.awt.BorderLayout());

        scpCustomer2.setName("scpCustomer2"); // NOI18N
        scpCustomer2.setPreferredSize(new java.awt.Dimension(452, 410));

        jTableDispatch.setName("jTableDispatch"); // NOI18N
        jTableDispatch.setPreferredSize(new java.awt.Dimension(0, 410));
        jTableDispatch.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jTableDispatch.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTableDispatchMouseClicked(evt);
            }
        });
        jTableDispatch.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTableDispatchKeyReleased(evt);
            }
        });
        scpCustomer2.setViewportView(jTableDispatch);

        jPanel40.add(scpCustomer2, java.awt.BorderLayout.CENTER);

        jPanel31.add(jPanel40, java.awt.BorderLayout.CENTER);

        jPanel21.add(jPanel31, java.awt.BorderLayout.CENTER);

        jPanel7.add(jPanel21, java.awt.BorderLayout.CENTER);

        jPanelLeft.add(jPanel7, java.awt.BorderLayout.CENTER);

        jPanel6.add(jPanelLeft);

        jPanel41.setName("jPanel41"); // NOI18N
        jPanel41.setLayout(new java.awt.BorderLayout(5, 0));

        jPanel42.setName("jPanel42"); // NOI18N
        jPanel42.setPreferredSize(new java.awt.Dimension(35, 525));
        jPanel42.setLayout(new java.awt.BorderLayout());

        jPanel43.setName("jPanel43"); // NOI18N
        jPanel43.setPreferredSize(new java.awt.Dimension(70, 250));

        javax.swing.GroupLayout jPanel43Layout = new javax.swing.GroupLayout(jPanel43);
        jPanel43.setLayout(jPanel43Layout);
        jPanel43Layout.setHorizontalGroup(
            jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 35, Short.MAX_VALUE)
        );
        jPanel43Layout.setVerticalGroup(
            jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 250, Short.MAX_VALUE)
        );

        jPanel42.add(jPanel43, java.awt.BorderLayout.PAGE_START);

        jPanel44.setName("jPanel44"); // NOI18N
        jPanel44.setLayout(new java.awt.CardLayout());

        jButtonGiveID.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/previous.png"))); // NOI18N
        jButtonGiveID.setName("jButtonGiveID"); // NOI18N
        jButtonGiveID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonGiveIDActionPerformed(evt);
            }
        });
        jPanel44.add(jButtonGiveID, "card2");

        jPanel42.add(jPanel44, java.awt.BorderLayout.CENTER);

        jPanel45.setName("jPanel45"); // NOI18N
        jPanel45.setPreferredSize(new java.awt.Dimension(70, 250));

        javax.swing.GroupLayout jPanel45Layout = new javax.swing.GroupLayout(jPanel45);
        jPanel45.setLayout(jPanel45Layout);
        jPanel45Layout.setHorizontalGroup(
            jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 35, Short.MAX_VALUE)
        );
        jPanel45Layout.setVerticalGroup(
            jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 250, Short.MAX_VALUE)
        );

        jPanel42.add(jPanel45, java.awt.BorderLayout.PAGE_END);

        jPanel41.add(jPanel42, java.awt.BorderLayout.LINE_START);

        jPanel46.setName("jPanel46"); // NOI18N
        jPanel46.setLayout(new java.awt.BorderLayout(0, 10));

        jPanel47.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel47.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel47.border.titleFont"), resourceMap.getColor("jPanel47.border.titleColor"))); // NOI18N
        jPanel47.setName("jPanel47"); // NOI18N
        jPanel47.setPreferredSize(new java.awt.Dimension(550, 90));
        jPanel47.setLayout(new java.awt.GridLayout(2, 1, 0, 5));

        jPanel48.setName("jPanel48"); // NOI18N
        jPanel48.setLayout(new java.awt.BorderLayout(25, 0));

        jPanel50.setName("jPanel50"); // NOI18N
        jPanel50.setPreferredSize(new java.awt.Dimension(170, 132));
        jPanel50.setLayout(new java.awt.BorderLayout());

        txtSearchProduct.setName("txtSearchProduct"); // NOI18N
        jPanel50.add(txtSearchProduct, java.awt.BorderLayout.CENTER);

        jPanel48.add(jPanel50, java.awt.BorderLayout.LINE_START);

        jPanel51.setName("jPanel51"); // NOI18N
        jPanel51.setLayout(new java.awt.BorderLayout());

        jPanel59.setName("jPanel59"); // NOI18N
        jPanel59.setPreferredSize(new java.awt.Dimension(117, 33));
        jPanel59.setLayout(new java.awt.BorderLayout());

        jButtonSearchProduct.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bugreportingsystem/resources/Search1.Png"))); // NOI18N
        jButtonSearchProduct.setText(resourceMap.getString("jButtonSearchProduct.text")); // NOI18N
        jButtonSearchProduct.setName("jButtonSearchProduct"); // NOI18N
        jButtonSearchProduct.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSearchProductActionPerformed(evt);
            }
        });
        jPanel59.add(jButtonSearchProduct, java.awt.BorderLayout.CENTER);

        jPanel51.add(jPanel59, java.awt.BorderLayout.LINE_END);

        jPanel70.setName("jPanel70"); // NOI18N
        jPanel70.setLayout(new java.awt.BorderLayout());

        jPanel71.setName("jPanel71"); // NOI18N
        jPanel71.setPreferredSize(new java.awt.Dimension(60, 25));
        jPanel71.setLayout(new java.awt.BorderLayout());

        buttonGroup5.add(jRadioButtonIdProduce);
        jRadioButtonIdProduce.setText(resourceMap.getString("jRadioButtonIdProduce.text")); // NOI18N
        jRadioButtonIdProduce.setName("jRadioButtonIdProduce"); // NOI18N
        jPanel71.add(jRadioButtonIdProduce, java.awt.BorderLayout.CENTER);

        jPanel70.add(jPanel71, java.awt.BorderLayout.LINE_START);

        jPanel75.setName("jPanel75"); // NOI18N
        jPanel75.setLayout(new java.awt.BorderLayout());

        buttonGroup5.add(jRadioButtonNameProduce);
        jRadioButtonNameProduce.setText(resourceMap.getString("jRadioButtonNameProduce.text")); // NOI18N
        jRadioButtonNameProduce.setName("jRadioButtonNameProduce"); // NOI18N
        jPanel75.add(jRadioButtonNameProduce, java.awt.BorderLayout.CENTER);

        jPanel70.add(jPanel75, java.awt.BorderLayout.CENTER);

        jPanel51.add(jPanel70, java.awt.BorderLayout.CENTER);

        jPanel48.add(jPanel51, java.awt.BorderLayout.CENTER);

        jPanel47.add(jPanel48);

        jPanel52.setName("jPanel52"); // NOI18N
        jPanel52.setLayout(new java.awt.BorderLayout(5, 0));

        jPanel53.setName("jPanel53"); // NOI18N
        jPanel53.setPreferredSize(new java.awt.Dimension(0, 30));

        javax.swing.GroupLayout jPanel53Layout = new javax.swing.GroupLayout(jPanel53);
        jPanel53.setLayout(jPanel53Layout);
        jPanel53Layout.setHorizontalGroup(
            jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel53Layout.setVerticalGroup(
            jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 28, Short.MAX_VALUE)
        );

        jPanel52.add(jPanel53, java.awt.BorderLayout.LINE_START);

        jPanel54.setName("jPanel54"); // NOI18N
        jPanel54.setLayout(new java.awt.BorderLayout());

        jPanel55.setName("jPanel55"); // NOI18N
        jPanel55.setPreferredSize(new java.awt.Dimension(100, 25));
        jPanel55.setLayout(new java.awt.BorderLayout());

        buttonGroup4.add(jRadioButtonProduce);
        jRadioButtonProduce.setText(resourceMap.getString("jRadioButtonProduce.text")); // NOI18N
        jRadioButtonProduce.setName("jRadioButtonProduce"); // NOI18N
        jRadioButtonProduce.setPreferredSize(new java.awt.Dimension(100, 25));
        jPanel55.add(jRadioButtonProduce, java.awt.BorderLayout.CENTER);

        jPanel54.add(jPanel55, java.awt.BorderLayout.LINE_START);

        jPanel56.setName("jPanel56"); // NOI18N
        jPanel56.setLayout(new java.awt.BorderLayout());

        jPanel57.setName("jPanel57"); // NOI18N
        jPanel57.setPreferredSize(new java.awt.Dimension(220, 25));
        jPanel57.setLayout(new java.awt.GridLayout(1, 0));

        buttonGroup4.add(jRadioButtonProducer);
        jRadioButtonProducer.setText(resourceMap.getString("jRadioButtonProducer.text")); // NOI18N
        jRadioButtonProducer.setMaximumSize(new java.awt.Dimension(232, 25));
        jRadioButtonProducer.setMinimumSize(new java.awt.Dimension(232, 25));
        jRadioButtonProducer.setName("jRadioButtonProducer"); // NOI18N
        jRadioButtonProducer.setPreferredSize(new java.awt.Dimension(245, 25));
        jPanel57.add(jRadioButtonProducer);

        jPanel56.add(jPanel57, java.awt.BorderLayout.LINE_START);

        jPanel82.setName("jPanel82"); // NOI18N
        jPanel82.setPreferredSize(new java.awt.Dimension(105, 25));
        jPanel82.setLayout(new java.awt.BorderLayout());

        jButton12.setIcon(resourceMap.getIcon("jButton12.icon")); // NOI18N
        jButton12.setText(resourceMap.getString("jButton12.text")); // NOI18N
        jButton12.setName("jButton12"); // NOI18N
        jButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton12ActionPerformed(evt);
            }
        });
        jPanel82.add(jButton12, java.awt.BorderLayout.CENTER);

        jPanel56.add(jPanel82, java.awt.BorderLayout.CENTER);

        jPanel54.add(jPanel56, java.awt.BorderLayout.CENTER);

        jPanel52.add(jPanel54, java.awt.BorderLayout.CENTER);

        jPanel47.add(jPanel52);

        jPanel46.add(jPanel47, java.awt.BorderLayout.PAGE_START);

        jPanel58.setName("jPanel58"); // NOI18N
        jPanel58.setLayout(new java.awt.BorderLayout(0, 10));

        jPanel60.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel60.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel60.border.titleFont"), resourceMap.getColor("jPanel60.border.titleColor"))); // NOI18N
        jPanel60.setName("jPanel60"); // NOI18N
        jPanel60.setPreferredSize(new java.awt.Dimension(470, 220));
        jPanel60.setRequestFocusEnabled(false);
        jPanel60.setLayout(new java.awt.BorderLayout());

        scpCustomer3.setName("scpCustomer3"); // NOI18N
        scpCustomer3.setPreferredSize(new java.awt.Dimension(452, 410));

        jTableProduce.setName("jTableProduce"); // NOI18N
        jTableProduce.setPreferredSize(new java.awt.Dimension(0, 410));
        jTableProduce.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jTableProduce.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTableProduceMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jTableProduceMouseEntered(evt);
            }
        });
        jTableProduce.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTableProduceKeyReleased(evt);
            }
        });
        scpCustomer3.setViewportView(jTableProduce);

        jPanel60.add(scpCustomer3, java.awt.BorderLayout.CENTER);

        jPanel58.add(jPanel60, java.awt.BorderLayout.PAGE_START);

        jPanel61.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel61.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel61.border.titleFont"), resourceMap.getColor("jPanel61.border.titleColor"))); // NOI18N
        jPanel61.setName("jPanel61"); // NOI18N
        jPanel61.setLayout(new java.awt.GridLayout(2, 1, 0, 5));

        jPanel62.setName("jPanel62"); // NOI18N
        jPanel62.setLayout(new java.awt.BorderLayout());

        jPanel63.setName("jPanel63"); // NOI18N
        jPanel63.setPreferredSize(new java.awt.Dimension(75, 119));
        jPanel63.setLayout(new java.awt.GridLayout(3, 1, 0, 5));

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N
        jPanel63.add(jLabel3);

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N
        jPanel63.add(jLabel5);

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N
        jPanel63.add(jLabel6);

        jPanel62.add(jPanel63, java.awt.BorderLayout.LINE_START);

        jPanel64.setName("jPanel64"); // NOI18N
        jPanel64.setLayout(new java.awt.GridLayout(3, 1, 0, 5));

        jTextFieldNameProduce.setEditable(false);
        jTextFieldNameProduce.setName("jTextFieldNameProduce"); // NOI18N
        jPanel64.add(jTextFieldNameProduce);

        jTextFieldPrice.setEditable(false);
        jTextFieldPrice.setName("jTextFieldPrice"); // NOI18N
        jPanel64.add(jTextFieldPrice);

        jPanel65.setName("jPanel65"); // NOI18N
        jPanel65.setLayout(new java.awt.BorderLayout(15, 0));

        jPanel66.setName("jPanel66"); // NOI18N
        jPanel66.setPreferredSize(new java.awt.Dimension(150, 42));
        jPanel66.setLayout(new java.awt.GridLayout(1, 0));

        jTextFieldWarranty.setEditable(false);
        jTextFieldWarranty.setName("jTextFieldWarranty"); // NOI18N
        jPanel66.add(jTextFieldWarranty);

        jPanel65.add(jPanel66, java.awt.BorderLayout.LINE_START);

        jPanel67.setName("jPanel67"); // NOI18N
        jPanel67.setLayout(new java.awt.GridLayout(1, 0));

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N
        jPanel67.add(jLabel12);

        jPanel65.add(jPanel67, java.awt.BorderLayout.CENTER);

        jPanel64.add(jPanel65);

        jPanel62.add(jPanel64, java.awt.BorderLayout.CENTER);

        jPanel61.add(jPanel62);

        jPanel68.setName("jPanel68"); // NOI18N
        jPanel68.setLayout(new java.awt.BorderLayout());

        jPanel69.setMinimumSize(new java.awt.Dimension(70, 116));
        jPanel69.setName("jPanel69"); // NOI18N
        jPanel69.setPreferredSize(new java.awt.Dimension(75, 116));
        jPanel69.setLayout(new java.awt.BorderLayout(10, 0));

        jPanel79.setName("jPanel79"); // NOI18N
        jPanel79.setLayout(new java.awt.GridLayout(1, 0));

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N
        jPanel79.add(jLabel7);

        jPanel69.add(jPanel79, java.awt.BorderLayout.PAGE_START);

        jPanel80.setName("jPanel80"); // NOI18N

        javax.swing.GroupLayout jPanel80Layout = new javax.swing.GroupLayout(jPanel80);
        jPanel80.setLayout(jPanel80Layout);
        jPanel80Layout.setHorizontalGroup(
            jPanel80Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 75, Short.MAX_VALUE)
        );
        jPanel80Layout.setVerticalGroup(
            jPanel80Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 110, Short.MAX_VALUE)
        );

        jPanel69.add(jPanel80, java.awt.BorderLayout.CENTER);

        jPanel68.add(jPanel69, java.awt.BorderLayout.LINE_START);

        jPanel81.setName("jPanel81"); // NOI18N
        jPanel81.setLayout(new java.awt.BorderLayout());

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jTextAreaInformation.setColumns(20);
        jTextAreaInformation.setRows(5);
        jTextAreaInformation.setName("jTextAreaInformation"); // NOI18N
        jScrollPane2.setViewportView(jTextAreaInformation);

        jPanel81.add(jScrollPane2, java.awt.BorderLayout.CENTER);

        jPanel68.add(jPanel81, java.awt.BorderLayout.CENTER);

        jPanel61.add(jPanel68);

        jPanel58.add(jPanel61, java.awt.BorderLayout.CENTER);

        jPanel46.add(jPanel58, java.awt.BorderLayout.CENTER);

        jPanel41.add(jPanel46, java.awt.BorderLayout.CENTER);

        jPanel6.add(jPanel41);

        jPanelOrder.add(jPanel6, java.awt.BorderLayout.CENTER);

        jLabel8.setName("jLabel8"); // NOI18N
        jLabel8.setPreferredSize(new java.awt.Dimension(0, 2));
        jPanelOrder.add(jLabel8, java.awt.BorderLayout.PAGE_END);

        jLabel13.setName("jLabel13"); // NOI18N
        jLabel13.setPreferredSize(new java.awt.Dimension(2, 0));
        jPanelOrder.add(jLabel13, java.awt.BorderLayout.LINE_END);

        jLabel14.setName("jLabel14"); // NOI18N
        jLabel14.setPreferredSize(new java.awt.Dimension(2, 0));
        jPanelOrder.add(jLabel14, java.awt.BorderLayout.LINE_START);

        jTabbedPane1.addTab(resourceMap.getString("jPanelOrder.TabConstraints.tabTitle"), jPanelOrder); // NOI18N

        getContentPane().add(jTabbedPane1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTableOrderMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableOrderMouseClicked
        // TODO add your handling code here
        try {
            int r = jTableOrder.getSelectedRow();
            idorder = Integer.parseInt(jTableOrder.getValueAt(r, 0).toString());
            jTextFieldIDOrder.setText(String.valueOf(idorder));
            DisplayDispatch(DispatchNo.ListIDDONOD(idorder));
        } catch (Exception ex) {
        }
}//GEN-LAST:event_jTableOrderMouseClicked

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
        // TODO add your handling code here:
        if (idorder < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("AddMoneyQuantity"));
        } else {
            or.setQuantity(DispatchNo.ListIDDONOD(idorder).size());
            or.setTotal(DispatchNo.ListMoney(idorder));
            or.setIdorder(idorder);
            if (or.updatequantitymoney()) {
                JOptionPane.showMessageDialog(null, rb.getString("AddSuccess"));
                DisplayTableOrder(Order.ListOrderOnID(idorder));
                DisplayDispatch(DispatchNo.ListIDDONOD(idorder));
            } else {
                JOptionPane.showMessageDialog(null, rb.getString("AddFail"));
            }

        }
}//GEN-LAST:event_jButton8ActionPerformed

    private void jButtonAddOrderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddOrderActionPerformed
        // TODO add your handling code here:
         if (jTextFieldNameCustomer.getText().toString().trim().length() == 0) {
            JOptionPane.showMessageDialog(null, rb.getString("GoToTabCustomer"));
            jTabbedPane1.setSelectedIndex(0);
        } else {
            or.setIdcustomer(idct);
            or.setIdemployee(idemployee);
            Date dateorder = new Date();
            java.sql.Date dateorder1 = new java.sql.Date(dateorder.getTime());
            or.setDateorder(dateorder1);
            or.setTotal(0);
            or.setQuantity(0);
            if (or.addorder() == true) {
                JOptionPane.showMessageDialog(null, rb.getString("AddSuccess"));
                DisplayTableOrder(Order.ListOrder());
                jTextFieldNameCustomer.setText("");
                idct = -1;

            } else {
                JOptionPane.showMessageDialog(null, rb.getString("AddFail"));
            }
        }
}//GEN-LAST:event_jButtonAddOrderActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        // TODO add your handling code here:
        if (idorder < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseOrderUpdate"));
        } else if (jTextFieldNameCustomer.getText().toString().trim().length() == 0) {
            JOptionPane.showMessageDialog(null, rb.getString("GoToTabCustomer"));
            jTabbedPane1.setSelectedIndex(0);
        } else {
            //int index= jComboBoxCustomer.getSelectedIndex();
            or.setIdorder(idorder);
            or.setIdcustomer(idct);
            if (or.updatecustomer() == true) {
                JOptionPane.showMessageDialog(null, rb.getString("UpdateSuccess"));
                DisplayTableOrder(Order.ListOrderOnID(idorder));
                DisplayDispatch(DispatchNo.ListIDDONOD(idorder));
                jTextFieldNameCustomer.setText("");
                idct = -1;
                idorder = -1;

            } else {
                JOptionPane.showMessageDialog(null, rb.getString("UpdateFail"));
            }
        }
}//GEN-LAST:event_jButton5ActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
        // TODO add your handling code here:
        if (idorder < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseOrderDelete"));
        } else {
            or.setIdorder(idorder);
            int value = JOptionPane.showConfirmDialog(null, rb.getString("AreYouSure"), rb.getString("Accept"), JOptionPane.YES_NO_CANCEL_OPTION);
            if (value == JOptionPane.OK_OPTION) {

                if (or.deleteorder()) {
                    JOptionPane.showMessageDialog(null, rb.getString("DeleteSuccess"));
                    DisplayTableOrder(Order.ListOrder());
                    DisplayDispatch(DispatchNo.ListIDD());
                    idorder = -1;

                } else if (!or.deleteorder()) {
                    JOptionPane.showMessageDialog(null, rb.getString("DeleteAllDispatch"));
                }
            }
        }
}//GEN-LAST:event_jButton10ActionPerformed

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        // TODO add your handling code here:
        DispatchNo dp = new DispatchNo();
        if (idorder < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseAnOrder"));
        } else if (idproduce < 0 && jTextFieldNameProduces.getText().toString().trim().length() == 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChoosProduct"));
        } else {
            dp.setIdorder(idorder);
            if (idproduce < 0) {
                JOptionPane.showMessageDialog(null, rb.getString("ChoosProduct"));
            } else {
                dp.setIdproduce(idproduce);
                if (dp.adddispatch() == true) {
                    JOptionPane.showMessageDialog(null, rb.getString("AddSuccess"));
                    DisplayDispatch(DispatchNo.ListIDDONOD(idorder));
                    DisplayTableOrder(Order.ListOrderOnID(idorder));
                    idproduce = -1;
                    jTextFieldNameProduces.setText("");
                } else {
                    JOptionPane.showMessageDialog(null, rb.getString("AddFail"));
                }
            }
        }
}//GEN-LAST:event_jButton6ActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
        // TODO add your handling code here:
        if (iddispatch < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseOneDispatchUpdate"));
        } else if (idproduce < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChoosProduct"));
        } else if (idorder < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseAnOrder"));
        } else {
            DispatchNo ds = new DispatchNo();
            ds.setIdproduce(idproduce);
            ds.setIddispatch(iddispatch);
            if (ds.updateproduce() == true) {
                JOptionPane.showMessageDialog(null, rb.getString("UpdateSuccess"));

                DisplayTableOrder(Order.ListOrderOnID(idorder));
                DisplayDispatch(DispatchNo.ListIDDONOD(idorder));
                idproduce = -1;
                iddispatch=-1;
                jTextFieldNameProduces.setText("");
            } else {
                JOptionPane.showMessageDialog(null, rb.getString("UpdateFail"));
            }
        }
}//GEN-LAST:event_jButton7ActionPerformed

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
        // TODO add your handling code here:
        if (iddispatch < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseDispatchDelete"));
        } else {
            DispatchNo ds = new DispatchNo();
            ds.setIddispatch(iddispatch);
            ds.setIdorder(idorder);
            if (ds.deletedispatch() == true) {
                JOptionPane.showMessageDialog(null, rb.getString("DeleteSuccess"));
                DisplayDispatch(DispatchNo.ListIDDONOD(idorder));
                iddispatch = -1;
                idproduce = -1;
                jTextFieldNameProduces.setText("");
            } else {
                JOptionPane.showMessageDialog(null, rb.getString("Dispatchisinused"));
            }
        }
}//GEN-LAST:event_jButton9ActionPerformed

    private void jTableDispatchMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableDispatchMouseClicked
        // TODO add your handling code here:
        try {
            int r = jTableDispatch.getSelectedRow();
            iddispatch = Integer.valueOf(jTableDispatch.getValueAt(r, 0).toString());
            idorder = Integer.valueOf(jTableDispatch.getValueAt(r, 1).toString());
            idproduce = Produce.ListIdProduce(iddispatch);
            String nameproduce = jTableDispatch.getValueAt(r, 2).toString().trim();
            jTextFieldNameProduces.setText(nameproduce);
            jTextFieldIDOrder.setText(String.valueOf(idorder));
            DisplayTableOrder(Order.ListOrderOnIDDispatch(iddispatch));
        } catch (Exception ex) {
        }
}//GEN-LAST:event_jTableDispatchMouseClicked

    private void jButtonGiveIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonGiveIDActionPerformed
        // TODO add your handling code here:
        if (idpr < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChoosProduct"));
        } else {
            String nameproduce = Produce.nameproduces(idpr);
            jTextFieldNameProduces.setText(nameproduce);
            idproduce = idpr;
        }
}//GEN-LAST:event_jButtonGiveIDActionPerformed

    private void jTableProduceMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableProduceMouseClicked
        // TODO add your handling code here:
        try {
            int r = jTableProduce.getSelectedRow();
            idpr = Integer.valueOf(this.jTableProduce.getValueAt(r, 0).toString());
            this.jTextFieldNameProduce.setText(this.jTableProduce.getValueAt(r, 1).toString());
            this.jTextFieldPrice.setText(this.jTableProduce.getValueAt(r, 2).toString());
            this.jTextFieldWarranty.setText(this.jTableProduce.getValueAt(r, 3).toString());
            this.jTextAreaInformation.setText(this.jTableProduce.getValueAt(r, 4).toString());
        } catch (Exception ex) {
        }

    }//GEN-LAST:event_jTableProduceMouseClicked

    private void jTableProduceMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableProduceMouseEntered
        // TODO add your handling code here:
}//GEN-LAST:event_jTableProduceMouseEntered

    private void jTabbedPane1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTabbedPane1MouseClicked
        // TODO add your handling code here:
        //AddCustomer();
    }//GEN-LAST:event_jTabbedPane1MouseClicked

    private void jTableOrderKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTableOrderKeyReleased
        // TODO add your handling code here:
        try {
            int r = jTableOrder.getSelectedRow();
            idorder = Integer.parseInt(jTableOrder.getValueAt(r, 0).toString());
            jTextFieldIDOrder.setText(String.valueOf(idorder));
            DisplayDispatch(DispatchNo.ListIDDONOD(idorder));
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_jTableOrderKeyReleased

    private void jTableDispatchKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTableDispatchKeyReleased
        // TODO add your handling code here:
        try {
            int r = jTableDispatch.getSelectedRow();
            iddispatch = Integer.valueOf(jTableDispatch.getValueAt(r, 0).toString());
            idorder = Integer.valueOf(jTableDispatch.getValueAt(r, 1).toString());
            jTextFieldIDOrder.setText(String.valueOf(idorder));
            idproduce = Produce.ListIdProduce(iddispatch);
            String nameproduce = jTableDispatch.getValueAt(r, 2).toString().trim();
            DisplayTableOrder(Order.ListOrderOnIDDispatch(iddispatch));
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_jTableDispatchKeyReleased

    private void jTableProduceKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTableProduceKeyReleased
        // TODO add your handling code here:
        try {
            int r = jTableProduce.getSelectedRow();
            idpr = Integer.valueOf(this.jTableProduce.getValueAt(r, 0).toString());
            this.jTextFieldNameProduce.setText(this.jTableProduce.getValueAt(r, 1).toString());
            this.jTextFieldPrice.setText(this.jTableProduce.getValueAt(r, 2).toString());
            this.jTextFieldWarranty.setText(this.jTableProduce.getValueAt(r, 3).toString());
            this.jTextAreaInformation.setText(this.jTableProduce.getValueAt(r, 4).toString());
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_jTableProduceKeyReleased

    private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
        // TODO add your handling code here:
        DisplayTableProduce(Produce.ListIDProducec());
        jTextFieldNameProduce.setText("");
        jTextFieldPrice.setText("");
        jTextFieldWarranty.setText("");
        jTextAreaInformation.setText("");
    }//GEN-LAST:event_jButton12ActionPerformed

    private void jTableCustomerMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableCustomerMouseClicked
        // TODO add your handling code here:
        try {
            this.jLabelPhone.setText("");
            this.jLabelName.setText("");
            this.jLabelAddress.setText("");
            this.jLabelEmail.setText("");
            DisplayCustomer();
        } catch (Exception e) {
        }

    }//GEN-LAST:event_jTableCustomerMouseClicked

    private void jTableCustomerKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTableCustomerKeyReleased
        // TODO add your handling code here:
        try {
            this.jLabelPhone.setText("");
            this.jLabelName.setText("");
            this.jLabelAddress.setText("");
            this.jLabelEmail.setText("");
            DisplayCustomer();
        } catch (Exception e) {
        }
}//GEN-LAST:event_jTableCustomerKeyReleased

    private void txtSearchKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchKeyReleased
        // TODO add your handling code here:
}//GEN-LAST:event_txtSearchKeyReleased

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        if (txtSearch.getText().trim().length() == 0) {
            JOptionPane.showMessageDialog(null, rb.getString("InputText"));
        } else {
            if (JRadioButtonName.isSelected() == false && JRadioButtonID.isSelected() == false) {
                JOptionPane.showMessageDialog(null, rb.getString("ChooseIdName"));
            } else {
                if (JRadioButtonID.isSelected() == true) {
                    if (CommonQuery.CheckIntNumber(txtSearch.getText()) == false) {
                        JOptionPane.showMessageDialog(null, rb.getString("InputNumberNotString"));
                    } else if (Customer.ListIDEONIDCUS(Integer.parseInt(txtSearch.getText().toString().trim())).size() == 0) {
                        JOptionPane.showMessageDialog(null, rb.getString("CantFindID"));
                        DisplayTableCustomerNull();
                        return;
                    } else {
                        DisplayTableCustomer(Customer.ListIDEONIDCUS(Integer.parseInt(txtSearch.getText().toString().trim())));
                    }

                }
                if (JRadioButtonName.isSelected() == true) {
                    if (Customer.ListIDEONNAMECUS(txtSearch.getText().toString().trim()).size() == 0) {
                        JOptionPane.showMessageDialog(null, rb.getString("CantFindName"));
                        DisplayTableCustomerNull();
                        return;
                    } else {
                        DisplayTableCustomer(Customer.ListIDEONNAMECUS(txtSearch.getText().toString().trim()));
                    }
                }
            }

        }
}//GEN-LAST:event_jButton1ActionPerformed

    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
        // TODO add your handling code here:
        DisplayTableCustomer(Customer.ListIDE());
        this.jLabelPhone.setText("");
        this.jLabelName.setText("");
        this.jLabelAddress.setText("");
        this.jLabelEmail.setText("");
        this.jTextFieldName.setText("");
        this.jTextFieldAddress.setText("");
        this.jTextFieldPhone.setText("");
        this.jTextFieldEmail.setText("");
        idct = -1;
        r = -1;
}//GEN-LAST:event_jButton11ActionPerformed

    private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddActionPerformed
        // TODO add your handling code here:
        this.jLabelPhone.setText("");
        this.jLabelName.setText("");
        this.jLabelAddress.setText("");
        this.jLabelEmail.setText("");
        if (GetSource() == true) {
            if (ct.addcus() == true) {
                JOptionPane.showMessageDialog(null, rb.getString("AddSuccess"));
                this.jTextFieldName.setText("");
                this.jTextFieldAddress.setText("");
                this.jTextFieldPhone.setText("");
                this.jTextFieldEmail.setText("");
            } else {
                JOptionPane.showMessageDialog(null, rb.getString("AddFail"));
            }
        }
        DisplayTableCustomer(Customer.ListIDE());
}//GEN-LAST:event_btnAddActionPerformed

    private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed
        // TODO add your handling code here:
        this.jLabelPhone.setText("");
        this.jLabelName.setText("");
        this.jLabelAddress.setText("");
        this.jLabelEmail.setText("");
        if (r < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseCustomerUpdate"));
        } else {
            ct.setIdcustomer(idct);
            if (GetSource() == true) {
                if (ct.updatecus() == true) {
                    JOptionPane.showMessageDialog(null, rb.getString("UpdateSuccess"));
                    this.jTextFieldName.setText("");
                    this.jTextFieldAddress.setText("");
                    this.jTextFieldPhone.setText("");
                    this.jTextFieldEmail.setText("");
                    DisplayTableCustomer(Customer.ListIDEONIDCUS(idct));
                    r = -1;
                } else {
                    JOptionPane.showMessageDialog(null, rb.getString("UpdateFail"));
                }
            }
        }

}//GEN-LAST:event_btnEditActionPerformed

    private void CleanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CleanActionPerformed
        // TODO add your handling code here:
        this.jLabelPhone.setText("");
        this.jLabelName.setText("");
        this.jLabelAddress.setText("");
        this.jLabelEmail.setText("");
        this.jTextFieldName.setText("");
        this.jTextFieldAddress.setText("");
        this.jTextFieldPhone.setText("");
        this.jTextFieldEmail.setText("");
}//GEN-LAST:event_CleanActionPerformed

    private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteActionPerformed
        // TODO add your handling code here:
        this.jLabelPhone.setText("");
        this.jLabelName.setText("");
        this.jLabelAddress.setText("");
        this.jLabelEmail.setText("");
        if (r < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseCustomerDelete"));
        } else {
            ct.setIdcustomer(idct);
            if (ct.deletecus() == true) {
                JOptionPane.showMessageDialog(null, rb.getString("DeleteSuccess"));
                this.jTextFieldName.setText("");
                this.jTextFieldAddress.setText("");
                this.jTextFieldPhone.setText("");
                this.jTextFieldEmail.setText("");
                r = -1;
            } else {
                JOptionPane.showMessageDialog(null, rb.getString("CustomerIsInUsed"));
            }
        }
        DisplayTableCustomer(Customer.ListIDE());
}//GEN-LAST:event_btnDeleteActionPerformed

    private void jButtonSelectCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSelectCustomerActionPerformed
        // TODO add your handling code here:
        if (r < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseCustomerAddOrder"));
        } else if (r >= 0) {
            this.jTextFieldNameCustomer.setText(this.jTableCustomer.getValueAt(r, 1).toString());
            JOptionPane.showMessageDialog(null, rb.getString("AddSuccessGotoTab"));
            this.jTabbedPane1.setSelectedIndex(1);
        }
    }//GEN-LAST:event_jButtonSelectCustomerActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

        if (txtSearchOrder.getText().trim().length() == 0) {
            JOptionPane.showMessageDialog(null, rb.getString("InputText"));
        } else {
            if (jRadioButtonID.isSelected() == false && jRadioButtonName.isSelected() == false && jRadioButtonCustomer.isSelected() == false && jRadioButtonOrder.isSelected() == false && jRadioButtonDispatch.isSelected() == false) {
                JOptionPane.showMessageDialog(null, rb.getString("ChooseButton"));
            }
            if (jRadioButtonID.isSelected() == false && jRadioButtonName.isSelected() == false) {
                JOptionPane.showMessageDialog(null, rb.getString("ChooseIdName"));
            }
            if (jRadioButtonOrder.isSelected() == false && jRadioButtonDispatch.isSelected() == false && jRadioButtonCustomer.isSelected() == false) {
                JOptionPane.showMessageDialog(null, rb.getString("ChooseOrderDispatch"));
            }
            if (jRadioButtonName.isSelected() == true && jRadioButtonCustomer.isSelected() == true) {
                if (Order.ListOrderOnNameCustomer(txtSearchOrder.getText().toString()).size() == 0 && DispatchNo.ListDispatchOnNameCustomer(txtSearchOrder.getText().toString()).size() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("CantFindNameCustomer"));
                    DisplayDispatchNull();
                    DisplayTableOrderNull();
                    return;
                } else {
                    DisplayTableOrder(Order.ListOrderOnNameCustomer(txtSearchOrder.getText().toString()));
                    DisplayDispatch(DispatchNo.ListDispatchOnNameCustomer(txtSearchOrder.getText().toString()));
                }
            }
            if (jRadioButtonID.isSelected() == true && jRadioButtonCustomer.isSelected() == true) {
                if (CommonQuery.CheckIntNumber(txtSearchOrder.getText()) == false) {
                    JOptionPane.showMessageDialog(null, rb.getString("InputNumberNotString"));
                } else if (Order.ListOrderOnIDCustomer(Integer.parseInt(txtSearchOrder.getText().toString())).size() == 0 && DispatchNo.ListDispatchOnIDCustomer(Integer.parseInt(txtSearchOrder.getText().toString())).size() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("CantFindValueIdCustomer"));
                    DisplayDispatchNull();
                    DisplayTableOrderNull();
                    return;
                } else {
                    DisplayTableOrder(Order.ListOrderOnIDCustomer(Integer.parseInt(txtSearchOrder.getText().toString())));
                    DisplayDispatch(DispatchNo.ListDispatchOnIDCustomer(Integer.parseInt(txtSearchOrder.getText().toString())));
                }
            }
            if (jRadioButtonID.isSelected() == true && jRadioButtonDispatch.isSelected() == true) {
                if (CommonQuery.CheckIntNumber(txtSearchOrder.getText()) == false) {
                    JOptionPane.showMessageDialog(null, rb.getString("InputNumberNotString"));
                } else if (DispatchNo.ListIDDONID(Integer.parseInt(txtSearchOrder.getText().toString())).size() == 0 && Order.ListOrderOnIDDispatch(Integer.parseInt(txtSearchOrder.getText().toString())).size() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("CantFindValueIdDispatch"));
                    DisplayDispatchNull();
                    DisplayTableOrderNull();
                    return;
                } else {
                    DisplayDispatch(DispatchNo.ListIDDONID(Integer.parseInt(txtSearchOrder.getText().toString())));
                    DisplayTableOrder(Order.ListOrderOnIDDispatch(Integer.parseInt(txtSearchOrder.getText().toString())));
                }
            }
            if (jRadioButtonID.isSelected() == true && jRadioButtonOrder.isSelected() == true) {
                if (CommonQuery.CheckIntNumber(txtSearchOrder.getText().trim()) == false) {
                    JOptionPane.showMessageDialog(null, rb.getString("InputNumberNotString"));
                } else if (Order.ListOrderOnID(Integer.parseInt(txtSearchOrder.getText().toString())).size() == 0 && DispatchNo.ListIDDONOD(Integer.parseInt(txtSearchOrder.getText().toString())).size() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("CantFindValueIdOrder"));
                    DisplayDispatchNull();
                    DisplayTableOrderNull();
                    return;
                } else {
                    DisplayTableOrder(Order.ListOrderOnID(Integer.parseInt(txtSearchOrder.getText().toString())));
                    DisplayDispatch(DispatchNo.ListIDDONOD(Integer.parseInt(txtSearchOrder.getText().toString())));
                }
            }
        }
}//GEN-LAST:event_jButton2ActionPerformed

    private void jRadioButtonIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonIDActionPerformed
        // TODO add your handling code here:
        if (jRadioButtonID.isSelected() == true) {
            jRadioButtonOrder.setEnabled(true);
            jRadioButtonDispatch.setEnabled(true);
        }
}//GEN-LAST:event_jRadioButtonIDActionPerformed

    private void jRadioButtonNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonNameActionPerformed
        // TODO add your handling code here:
        if (jRadioButtonName.isSelected() == true) {
            jRadioButtonOrder.setEnabled(false);
            jRadioButtonDispatch.setEnabled(false);
            jRadioButtonCustomer.setEnabled(true);

        }
}//GEN-LAST:event_jRadioButtonNameActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed

        DisplayDispatch(ep1);
        DisplayTableOrder(Order.ListOrder());
        idorder = -1;
        iddispatch = -1;
        idproduce = -1;
        jTextFieldNameCustomer.setText("");
        jTextFieldNameProduces.setText("");
        jTextFieldIDOrder.setText("");

    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
        Date now = new Date();
        java.sql.Date now1 = new java.sql.Date(now.getTime());
        DisplayTableOrder(Order.ListOrderToDay(now1));
        DisplayDispatch(DispatchNo.ListIDDToDay(now1));
}//GEN-LAST:event_jButton4ActionPerformed

    private void jRadioButtonOrderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonOrderActionPerformed
        // TODO add your handling code here:
        if (jRadioButtonOrder.isSelected() == true) {
            jRadioButtonName.setEnabled(false);
        }
}//GEN-LAST:event_jRadioButtonOrderActionPerformed

    private void jRadioButtonDispatchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonDispatchActionPerformed
        // TODO add your handling code here:
        if (jRadioButtonDispatch.isSelected() == true) {
            jRadioButtonName.setEnabled(false);

        }
}//GEN-LAST:event_jRadioButtonDispatchActionPerformed

    private void jRadioButtonCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonCustomerActionPerformed
        // TODO add your handling code here:
        if (jRadioButtonCustomer.isSelected() == true) {
            jRadioButtonName.setEnabled(true);
        }
}//GEN-LAST:event_jRadioButtonCustomerActionPerformed

    private void jButtonSearchProductActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSearchProductActionPerformed
        // TODO add your handling code here:
        if (jRadioButtonIdProduce.isSelected() == false && jRadioButtonNameProduce.isSelected() == false && jRadioButtonProduce.isSelected() == false && jRadioButtonProducer.isSelected() == false) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseButton"));
        } else if (txtSearchProduct.getText().toString().trim().length() == 0) {
            JOptionPane.showMessageDialog(null, rb.getString("InputText"));
        } else if (jRadioButtonIdProduce.isSelected() == false && jRadioButtonNameProduce.isSelected() == false) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseIdName"));
        } else if (jRadioButtonProduce.isSelected() == false && jRadioButtonProducer.isSelected() == false) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseProduceOrProducer"));
        } else if (jRadioButtonIdProduce.isSelected() == true && jRadioButtonProduce.isSelected() == true) {
            if (CommonQuery.CheckIntNumber(txtSearchProduct.getText()) == false) {
                JOptionPane.showMessageDialog(null, rb.getString("InputNumberNotString"));
            } else {
                if (Produce.ListProduceonidproduce(Integer.parseInt(txtSearchProduct.getText())).size() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("CantFindIdProduce"));
                    DisplayTableProduceNull();
                    return;
                } else {
                    DisplayTableProduce(Produce.ListProduceonidproduce(Integer.parseInt(txtSearchProduct.getText())));
                }
            }
        } else if (jRadioButtonIdProduce.isSelected() == true && jRadioButtonProducer.isSelected() == true) {
            if (CommonQuery.CheckIntNumber(txtSearchProduct.getText()) == false) {
                JOptionPane.showMessageDialog(null, rb.getString("InputNumberNotString"));
            } else {
                if (Produce.ListProduceonIDproducer(Integer.parseInt(txtSearchProduct.getText())).size() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("CantFindIdProducer"));
                    DisplayTableProduceNull();
                    return;
                } else {
                    DisplayTableProduce(Produce.ListProduceonIDproducer(Integer.parseInt(txtSearchProduct.getText())));
                }
            }
        } else if (jRadioButtonNameProduce.isSelected() == true && jRadioButtonProduce.isSelected() == true) {
            if (Produce.ListProduceonnameproduce(txtSearchProduct.getText()).size() == 0) {
                JOptionPane.showMessageDialog(null, rb.getString("CantFindNameProduce"));
                DisplayTableProduceNull();
                return;
            } else {
                DisplayTableProduce(Produce.ListProduceonnameproduce(txtSearchProduct.getText()));
            }
        } else if (jRadioButtonNameProduce.isSelected() == true && jRadioButtonProducer.isSelected() == true) {
            if (Produce.ListProduceonnameproducer(txtSearchProduct.getText()).size() == 0) {
                JOptionPane.showMessageDialog(null, rb.getString("CantFindNameProducer"));
                DisplayTableProduceNull();
                return;
            } else {
                DisplayTableProduce(Produce.ListProduceonnameproducer(txtSearchProduct.getText()));
            }
        }
    }//GEN-LAST:event_jButtonSearchProductActionPerformed

    private int checknumber(String a) {
        int b = 0;
        try {
            b = Integer.parseInt(a);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, rb.getString("InputNumberNotString"));
        }
        return b;
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Clean;
    private javax.swing.JRadioButton JRadioButtonID;
    private javax.swing.JRadioButton JRadioButtonName;
    private javax.swing.JScrollPane JTable;
    private javax.swing.JButton btnAdd;
    private javax.swing.JButton btnDelete;
    private javax.swing.JButton btnEdit;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.ButtonGroup buttonGroup4;
    private javax.swing.ButtonGroup buttonGroup5;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JButton jButtonAddOrder;
    private javax.swing.JButton jButtonGiveID;
    private javax.swing.JButton jButtonSearchProduct;
    private javax.swing.JButton jButtonSelectCustomer;
    private javax.swing.JComboBox jComboBoxSex;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelAddress;
    private javax.swing.JLabel jLabelEmail;
    private javax.swing.JLabel jLabelName;
    private javax.swing.JLabel jLabelPhone;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel100;
    private javax.swing.JPanel jPanel101;
    private javax.swing.JPanel jPanel102;
    private javax.swing.JPanel jPanel103;
    private javax.swing.JPanel jPanel104;
    private javax.swing.JPanel jPanel105;
    private javax.swing.JPanel jPanel106;
    private javax.swing.JPanel jPanel107;
    private javax.swing.JPanel jPanel108;
    private javax.swing.JPanel jPanel109;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel110;
    private javax.swing.JPanel jPanel111;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel40;
    private javax.swing.JPanel jPanel41;
    private javax.swing.JPanel jPanel42;
    private javax.swing.JPanel jPanel43;
    private javax.swing.JPanel jPanel44;
    private javax.swing.JPanel jPanel45;
    private javax.swing.JPanel jPanel46;
    private javax.swing.JPanel jPanel47;
    private javax.swing.JPanel jPanel48;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel50;
    private javax.swing.JPanel jPanel51;
    private javax.swing.JPanel jPanel52;
    private javax.swing.JPanel jPanel53;
    private javax.swing.JPanel jPanel54;
    private javax.swing.JPanel jPanel55;
    private javax.swing.JPanel jPanel56;
    private javax.swing.JPanel jPanel57;
    private javax.swing.JPanel jPanel58;
    private javax.swing.JPanel jPanel59;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel60;
    private javax.swing.JPanel jPanel61;
    private javax.swing.JPanel jPanel62;
    private javax.swing.JPanel jPanel63;
    private javax.swing.JPanel jPanel64;
    private javax.swing.JPanel jPanel65;
    private javax.swing.JPanel jPanel66;
    private javax.swing.JPanel jPanel67;
    private javax.swing.JPanel jPanel68;
    private javax.swing.JPanel jPanel69;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel70;
    private javax.swing.JPanel jPanel71;
    private javax.swing.JPanel jPanel72;
    private javax.swing.JPanel jPanel73;
    private javax.swing.JPanel jPanel75;
    private javax.swing.JPanel jPanel76;
    private javax.swing.JPanel jPanel77;
    private javax.swing.JPanel jPanel78;
    private javax.swing.JPanel jPanel79;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel80;
    private javax.swing.JPanel jPanel81;
    private javax.swing.JPanel jPanel82;
    private javax.swing.JPanel jPanel83;
    private javax.swing.JPanel jPanel84;
    private javax.swing.JPanel jPanel85;
    private javax.swing.JPanel jPanel86;
    private javax.swing.JPanel jPanel87;
    private javax.swing.JPanel jPanel88;
    private javax.swing.JPanel jPanel89;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPanel jPanel90;
    private javax.swing.JPanel jPanel91;
    private javax.swing.JPanel jPanel93;
    private javax.swing.JPanel jPanel94;
    private javax.swing.JPanel jPanel95;
    private javax.swing.JPanel jPanel96;
    private javax.swing.JPanel jPanel97;
    private javax.swing.JPanel jPanel98;
    private javax.swing.JPanel jPanel99;
    private javax.swing.JPanel jPanelCustomer;
    private javax.swing.JPanel jPanelInfomationCustomer;
    private javax.swing.JPanel jPanelLeft;
    private javax.swing.JPanel jPanelOrder;
    private javax.swing.JPanel jPanelTableCustomer;
    private javax.swing.JRadioButton jRadioButtonCustomer;
    private javax.swing.JRadioButton jRadioButtonDispatch;
    private javax.swing.JRadioButton jRadioButtonID;
    private javax.swing.JRadioButton jRadioButtonIdProduce;
    private javax.swing.JRadioButton jRadioButtonName;
    private javax.swing.JRadioButton jRadioButtonNameProduce;
    private javax.swing.JRadioButton jRadioButtonOrder;
    private javax.swing.JRadioButton jRadioButtonProduce;
    private javax.swing.JRadioButton jRadioButtonProducer;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jTableCustomer;
    private javax.swing.JTable jTableDispatch;
    private javax.swing.JTable jTableOrder;
    private javax.swing.JTable jTableProduce;
    private javax.swing.JTextArea jTextAreaInformation;
    private javax.swing.JTextField jTextFieldAddress;
    private javax.swing.JTextField jTextFieldEmail;
    private javax.swing.JTextField jTextFieldIDOrder;
    private javax.swing.JTextField jTextFieldName;
    private javax.swing.JTextField jTextFieldNameCustomer;
    private javax.swing.JTextField jTextFieldNameProduce;
    private javax.swing.JTextField jTextFieldNameProduces;
    private javax.swing.JTextField jTextFieldPhone;
    private javax.swing.JTextField jTextFieldPrice;
    private javax.swing.JTextField jTextFieldWarranty;
    private javax.swing.JLabel lblAddress;
    private javax.swing.JLabel lblEmail;
    private javax.swing.JLabel lblName;
    private javax.swing.JLabel lblName1;
    private javax.swing.JLabel lblName2;
    private javax.swing.JLabel lblName3;
    private javax.swing.JLabel lblName4;
    private javax.swing.JLabel lblPhone;
    private javax.swing.JScrollPane scpCustomer;
    private javax.swing.JScrollPane scpCustomer2;
    private javax.swing.JScrollPane scpCustomer3;
    private javax.swing.JTextField txtSearch;
    private javax.swing.JTextField txtSearchOrder;
    private javax.swing.JTextField txtSearchProduct;
    // End of variables declaration//GEN-END:variables
}
